Instance of Symbol 189 MovieClip "loaderFader" in Frame 1
onClipEvent (load) {
_alpha = 0;
}
Frame 2
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
if (delayer == 20) {
var protocol = _url.substr(0, _url.indexOf(":"));
if (protocol == "file") {
gotoAndStop ("levLoad");
} else if (protocol == "http") {
var doubleSlash = _url.indexOf("//");
var server = _url.substr(doubleSlash + 2, (_url.indexOf("/", doubleSlash + 2) - doubleSlash) - 2);
var server = server.toUpperCase();
if (server.indexOf("WWW.") != -1) {
server = server.substr(server.indexOf("WWW.") + 4, server.length);
}
if (server.indexOf("WONPWN.COM") != -1) {
gotoAndStop ("levLoad");
} else if (server.indexOf("NEWGROUNDS.COM") != -1) {
gotoAndStop ("levLoad");
} else if (server.indexOf("UNGROUNDED.NET") != -1) {
gotoAndStop ("levLoad");
} else if (server.indexOf("UPLOADS.UNGROUNDED.NET") != -1) {
gotoAndStop ("levLoad");
} else if (_url.toLowerCase().indexOf("ungrounded") != -1) {
gotoAndStop ("levLoad");
} else {
siteSucks = server.toLowerCase() + " sucks because they steal games.";
var a = "you no-talent jerk, go make your own game";
getURL ("http://www.wonpwn.com");
gotoAndStop ("stolen");
}
}
} else if (delayer > 3) {
delayer++;
loaderFader._alpha = loaderFader._alpha + 10;
gotoAndPlay (1);
} else if (delayer == undefined) {
delayer = 0;
loader.gotoAndStop(100);
gotoAndPlay (1);
} else {
delayer++;
gotoAndPlay (1);
}
} else {
loader.gotoAndStop(Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + 1);
loader.percent = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + "%";
gotoAndPlay (1);
}
Frame 3
gotoAndStop ("uhoh");
Frame 4
function SOvarExists(varName) {
if (SO.data[varName] == undefined) {
return(false);
}
return(true);
}
function SOgetVar(varName) {
return(SO.data[varName]);
}
function SOsetVar(varName, value) {
SO.data[varName] = value;
}
_global.levels = new Array("6|26|2|1x50#9|23|1|1x50#6|20|0|1x50#3|23|3|1x50~$~21|26|2|1|0|0#11|15|2|0|0|1#11|14|2|0|0|1#11|13|2|0|0|1~$~0,objectives1,Learn_how_to_play|0,keycard,0|7,1|15,1|8#16,3,Welcome_to_Training~br~Press_the_R_key_at_any_time_to_restart~br~Press_the_M_key_to_access_the_menu|7,100|16,3,Press_the_arrow_keys_on_your_keyboard_to_sneak_around|0,tX,%PLAYERX%|0,tY,%PLAYERY%|1,%PLAYERX%,==,%tX%,3|1,%PLAYERY%,==,%tY%,2|7,5|9,5|7,40|16,3,Press_up_against_a_wall_by_moving_towards_it_and_holding_down_the_arrow_key|1,%ONWALL%,==,1,5|0,tX,%PLAYERX%|0,tY,%PLAYERY%|16,3,Press_the_arrow_keys_perpendicular_to_the_wall_to_slide_along_it|9,19|9,19|7,1|9,11|1,%ONWALL%,==,0,1|9,10|1,%PLAYERX%,==,%tX%,3|1,%PLAYERY%,==,%tY%,2|7,5|9,19|7,4|9,27|16,3,Step_on_the_center_tile_when_you_are_ready_to_continue|22,4,4,2,0|14,4,4,36|8#11,6,23|15,3|8#16,3,Move_near_an_enemy_and_press_Spacebar_to_snap_their_neck|1,%NMECOUNT%,==,3,3|16,3,Kill_the_remaining_guards|9,7|9,7|7,5|9,1|1,%NMECOUNT%,==,0,5|16,3,Step_on_the_center_tile_when_you_are_ready_to_continue|14,6,23,36|22,6,23,4,0|8|9,15|7,4|9,7|8#11,15,14|28,3|15,14|8#16,3,Push_the_crate_onto_the_pressure_pad|1,floor(21/21),==,1,5|16,3,Step_on_the_center_tile_when_you_are_ready_to_continue|14,24,21,36|22,24,21,6,0|8|9,9|7,5|9,1#11,17,9|28,1|15,7|8#16,3,If_a_red_exclamation_point_appears_above_your_head~c~_there_is_an_object_nearby_that_can_be_used|7,120|1,%keycard%,==,0,1|16,3,Search_the_lockers_along_the_wall_for_a_keycard_|8#16,0,You_find_nothing|21,%PLAYERX%,%PLAYERY%|8#16,0,You_found_a_keycard|16,3,Now_that_you_have_the_keycard~c~_use_the_switch_on_the_wall_to_open_the_door|0,keycard,1|21,%PLAYERX%,%PLAYERY%|8#1,%keycard%,==,1,8|10,switch|14,24,7,66|16,0,Access_Granted|16,3,Step_onto_the_exit_tile_to_complete_the_training_mission|14,25,7,1|21,24,8|13|9,11|10,error|16,0,Access_Denied|8#28,0|0,v,rand(1/29)|5,v,60|0,py,%PLAYERY%|3,py,0.5|20,popcan,%PLAYERX%,%py%,3,0,%v%,0,6|10,switch|8#16,3,Press_up_against_the_wall_and_use_spacebar_to_tap_on_it~br~When_the_guard_comes_down_to_investigate_the_noise~c~_sneak_past_him._Do_not_let_him_see_you_or_the_mission_will_end|8#11,15,14|28,3|15,14|8#16,3,Press_Z_to_plant_a_C4_charge~br~Plant_a_charge_next_to_the_crates_blocking_the_path|30,99|1,%C4AMOUNT%,==,99,2|7,1|9,2|14,14,15,37|14,14,14,37|14,14,13,37|16,3,Press_X_to_detonate_C4_charges~br~Stand_back_at_least_one_tile_or_else_you_will_be_caught_in_the_explosion_and_die|8#11,21,27|0,tempNum,%C4AMOUNT%|4,tempNum,-1|30,%tempNum%|28,0|15,5|8~$~24|8|10|1#18|9|11|1#20|9|8|1#21|9|8|1#22|9|9|1#9|14|15|0~$~~$~30x30#4x4#25x4#0#5#0#0~$~10^9*6^2^22*22^8^0*7^22*22^8^0*7^22*22^8^0*2^36*3^0*2^22*16^0*3^22*3^8^0*2^36^0^36^0*2^22*16^0*3^22*3^8^0*2^36*3^0*2^22*16^0*3^22*3^8^0*7^22*16^0*3^22*3^2^0*7^22*9^5*7^64^1^5^22*20^0^93^0^91*3^0*4^22*20^0*10^22*20^0*10^22*71^33*9^22*21^33^35^33*7^22*21^33*9^22*139^0^22*13^28^29^28^0*3^22*8^0*5^22*11^27^35^27^0*3^22*8^0^36*3^0^22*11^27^0*5^22*7^0*2^36^0^36^0*2^22*11^0^22*12^0^36*3^0^22*12^0^22*12^0*5^22*12^0^22*14^0^22*14^0^22*29^0^22*68", "6|1|2|1x140&2x90&4x1&1x70&2x180&4x2&1x60~$~~$~28,1|8~$~~$~~$~13x6#1x5#11x5#0#0#0#0~$~22*4^54^5^1^5^12^22*8^7^0*3^6^22*8^14^0*3^6^22*4^54^5^21^19^25^0*3^26^5*3^22^7^0*11^22^3^0*11^3", "5|4|2|1x60&3x&1x140&3x~$~~$~28,1|0,hint,Tap_on_the_wall_to_lure_the_guard_down~c~_then_snap_his_neck_when_he_comes_around_the_corner|8~$~~$~~$~8x11#1x9#6x2#0#0#0#0~$~22*3^54^5^15^5^22*4^7^29^58^0^22*4^18^27^0*2^3^22*3^17^0*3^22*4^17^0*3^22*4^16^0*3^22*4^7^0*3^22^54^5^15^25^0*3^22^7^0*6^22^3^0*6^22^7^59^0*5^22", "9|3|3|0x3&0x3&0x3&0x3&0x3&0x3&1x30&0x1&0x1&0x1&0x1&0x1&0x1&1x30~$~1|2|2|1|0|1#3|10|6|1|0|1#4|4|9|1|0|1#6|1|7|0|0|1~$~0,objectives1,Search_the_locker_room_for_a_keycard|0,key,0|28,3|0,doorOpen,0|8#28,0|16,0,You_find_nothing_of_interest|21,%PLAYERX%,%PLAYERY%|8#28,0|16,0,This_locker_is_full_of_garbage._Yuck.|21,%PLAYERX%,%PLAYERY%|8#28,0|16,0,You_find_a_keycard|0,key,1|21,%PLAYERX%,%PLAYERY%|8#28,0|16,0,You_find_5_C4|30,5|21,%PLAYERX%,%PLAYERY%|8#1,%key%,==,1,6|13|10,switch|16,0,Access_Granted|14,0,8,68|21,%PLAYERX%,%PLAYERY%|9,9|10,error|16,0,Access_Denied|8#1,%doorOpen%,==,0,3|14,8,6,1|0,doorOpen,1|9,6|14,8,6,2|0,doorOpen,0|10,switch|8#28,0|0,v,rand(1/29)|5,v,60|0,py,%PLAYERY%|3,py,0.5|20,popcan,%PLAYERX%,%py%,3,0,%v%,0,6|10,switch|8~$~2|2|4|1#3|2|1|1#4|2|3|1#5|2|1|1#7|2|1|1#8|2|1|1#9|2|1|1#10|2|2|1#8|5|6|1#8|7|6|1#1|8|5|1#6|8|7|1~$~1|1|0#4|9|0#4|10|0~$~13x13#11x9#1x9#0#5#0#0~$~54^5*10^15^22^7^29^91*4^0^91*4^0^22^7^0*11^22^14^0*11^22^7^0*11^22^7^0*11^22^7^9*6^2^1^9*2^2^22^7^0*5^93^0*5^22^66^0*11^22^3^0*3^87^0*7^3^7^0*3^88^0*7^22^14^0*11^22*14", "~$~5|3|2|1|0|1~$~1,floor(3/3),==,1,5|1,%doorOpen%,==,0,3|14,8,3,1|0,doorOpen,1|10,switch|9,10|1,%doorOpen%,==,1,3|14,8,3,4|0,doorOpen,0|10,switch|7,3|9,0#0,doorOpen,0|28,1|0,hint,Push_the_crate_onto_the_trigger_to_keep_the_door_open|7,5|15,0|8~$~~$~~$~12x6#1x3#10x1#0#0#0#1~$~54^5*3^15^5*5^1^5^7^0*7^8^0*3^7^0*7^2^0*3^3^0*2^35^0*4^3^0*3^7^0*7^8^0*3^14^0*7^2^0*3", "7|1|2|2x212#1|4|1|2x122#9|9|3|1x40#9|8|3|2x302~$~~$~0,hint,Guards_cant_see_you_as_easily_when_you_press_up_against_the_wall|8~$~~$~7|7|0#2|8|0#7|8|0#7|9|0~$~11x10#1x9#5x5#0#1#0#~$~54^5*3^21^20*2^19^5*2^12^7^0*9^6^7^0*9^6^18^0*2^36*5^0*2^6^17^0*2^36*5^0*2^6^17^0*2^36*5^0*2^6^17^0*2^36*5^0*2^6^16^0*2^36*5^0*2^6^7^0*9^6^7^0*9^6", "11|13|3|3x#9|8|0|0x0&0x0&0x0&0x3&0x3&0x3&0x3&0x2&0x2&0x2&0x1&0x1&0x1&0x1#7|18|1|0x1&0x1&0x1&1x10&0x3&0x3&0x3&1x10#1|2|1|1x25&3x~$~~$~0,hint,Guards_cannot_see_through_tall_bushes|8~$~~$~~$~12x20#1x14#10x1#1#1#0#0~$~40^39*9^1^39^38^34*7^32^36*3^38^31^32*3^33*2^34^33^36*3^38^30^33*5^34^33^36*3^38^36^33*5^34*5^56^36^33*5^32*2^33*2^34^38^36^33*2^34^30^33^34^30^33*2^34^38^30^33*2^34^30^33^32^33*3^34^38^30^33*2^34^33*6^32^38^30^33*2^34^33*7^38^30^33*2^34*5^33*3^38^30^33*2^34^31^32^33*2^31^32^33^38^30^34*3^30^33*3^30^33*2^38^36^33*2^34^33*3^32^33*3^56^36^33*2^34^30^33*6^38^36^33*2^34^33*7^38^30^33*2^34*5^33^30^33^38^30^33^32*2^34^33^32*3^33*2^38^30^33*3^34^33*6^38^30^33*3^34^33*6", "2|2|1|2x135&1x60#5|13|3|1x60&3x&1x170&3x#9|6|0|0x0&0x0&0x0&1x40&3x&1x50&2x180&0x2&0x2&0x2&1x30&2x0#9|10|2|1x40~$~7|13|6|1|0|1#7|14|1|1|0|1#7|4|2|1|0|1#2|6|3|1|1|0#2|7|3|1|1|0~$~28,3|16,0,You_find_1_C4_in_the_locker|30,1|21,%PLAYERX%,%PLAYERY%|8#28,3|16,0,The_locker_is_empty|21,%PLAYERX%,%PLAYERY%|8#0,haskey,0|28,2|0,hint,Kill_the_guard_to_get_the_key_to_the_door~c~_then_search_the_lockers_outside_to_get_the_C4_you'll_need|7,1|15,7|8#1,%haskey%,==,1,5|16,0,You_use_the_key_to_unlock_the_door|21,12,3|10,switch|14,11,3,1|9,7|16,0,The_door_is_locked__You_need_a_key|8#16,0,The_door_is_locked|8#10,switch|21,7,4|21,7,5|14,6,4,64|7,5|14,6,5,1|8#10,switch|21,3,10|14,3,11,1|8#1,%NMECOUNT%,==,3,3|0,haskey,1|16,0,You_found_a_key_on_the_guard|8|7,3~$~12|3|3|1#7|4|5|1#3|10|6|1#8|10|1|1#8|11|1|1#8|12|1|1~$~7|1|0#8|1|0#7|2|0#1|6|0#7|7|0#8|7|0#1|8|0#2|8|0#3|8|0#4|8|0#5|8|0#7|8|0~$~15x15#13x1#1x13#1#0#0#2~$~54^5*3^15^5*3^15^5*4^1^5^7^28^29^27^0*2^8^29^27^0*2^8^31^32*2^7^27^0*4^8^58^0*3^2^36^33*2^7^27^59^0*3^2^0*4^3^36^33*2^7^0*5^62^0*4^7^36^33*2^14^0*5^3^0*4^7^30^33*2^7^58^0*4^8^0*4^7^30^33*2^7^0*5^8^28^59^0*2^14^30^33*2^7^28^27*2^28^29^8^28^0*3^7^30^33*2^14^0*5^8^5*4^25^30^33*2^7^0*5^8^92^36*2^31^32^33*3^7^9^2^1^9*2^8^92^36*2^30^33*4^7^36*4^33^8^92^36*2^30^33*3^34^3^36^33*4^8^36*3^33*3^34*2^7^36^33*4^2^36*3^34*5", "~$~5|3|2|1|0|1~$~1,floor(3/3),==,1,6|1,%doorOpen%,==,0,4|14,8,3,1|14,10,3,4|0,doorOpen,1|10,switch|9,12|1,%doorOpen%,==,1,4|14,8,3,4|14,10,3,1|0,doorOpen,0|10,switch|7,3|9,0#0,doorOpen,0|0,hint,Certain_crates_can_explode~br~You_have_one_C4|7,5|15,0|8~$~~$~~$~14x6#1x3#12x1#1#0#0#1~$~54^5*3^15^5*3^12^22^54^5^1^5^18^0*7^6^22^7^0*3^16^0*7^26^15^25^0*3^3^0*2^35^0*4^3^0*5^18^0*7^24^4^23^0*3^16^0*7^6^22*5", "4|9|3|1x40#6|3|1|1x40~$~~$~0,doorOpen,1|7,5|13|15,1|8#1,floor(2/6),==,1,5|1,%doorOpen%,==,1,3|14,5,9,1|0,doorOpen,0|10,switch|9,10|1,%doorOpen%,==,0,3|14,5,9,4|0,doorOpen,1|10,switch|7,3|9,0~$~~$~~$~10x11#8x9#6x9#0#3#0#0~$~22*3^54^5^21^20*2^19^22*4^7^0*5^22^54^5^15^25^0*3^27^0^22^7^0*6^27^0^22^18^0^22*5^27^0^22^17^0^22*3^10^9^2^0^22^17^0^35^0^22^2^0*3^22^17^0^8^0^22^0*2^22^0^22^16^0^2^0^22*4^0^22^7^0*4^3^0^22^0^22*11", "5|1|2|1x5~$~8|8|2|1|0|1#8|3|2|1|0|1#2|9|1|1|0|1#2|5|2|1|0|1~$~0,hint,Enemies_will_walk_around_objects_you_push_into_their_path|8~$~~$~~$~10x11#8x2#1x1#0#3#0#0~$~54^5^15^5*5^15^5^7^0*5^8^58^0*2^7^0*3^8^0^8^0*3^7^9*3^2^0^2^0*2^58^7^0*9^18^0*3^58*2^0*2^58^0^17^58*2^0*7^17^0*7^58*2^17^0*2^58^0*6^16^0*2^58^0*6^7^58^0*4^58^0*2^58", "5|1|2|1x10&0x1&0x1&0x1&0x1&0x1&0x1&4x2&1x10&0x3&0x3&0x3&0x3&0x3&0x3&4x2#10|10|3|0x3&0x3&0x3&0x3&1x5&4x1&1x10&0x1&0x1&0x1&0x1&1x5&4x3&1x10#6|9|1|0x1&0x1&0x1&0x1&1x5&4x3&1x10&0x3&0x3&0x3&0x3&1x5&4x1&1x10~$~~$~0,wall,rand(1/4)|4,wall,2|2,wall,3|14,%wall%,11,1|0,wall2,rand(1/4)|15,1|8#1,%wall2%,==,1,2|14,5,6,1|8|1,%wall2%,==,2,2|14,7,6,1|8|1,%wall2%,==,3,2|14,9,6,1|8|14,11,6,1|8#1,%wall%,==,1,2|14,5,11,1|9,10|1,%wall%,==,2,2|14,7,11,1|9,10|1,%wall%,==,3,2|14,9,11,1|9,10|14,11,11,1|8~$~~$~~$~16x20#8x18#8x1#0#1#0#0~$~22*4^54^5^15^5^1^5^15^5^12^22*7^7^36*7^6^22*7^7^37*7^6^22*7^18^37*7^6^22*7^17^37*7^6^22*7^17^37*7^6^22*7^17^27^8^27^8^27^8^27^6^22*7^17^37^8^37^8^37^8^0^6^22*7^17^37^2^37^2^37^2^37^6^22*7^17^37*6^0^6^22*7^16^37^0^37^0^37*3^6^22*7^7^27^8^27^8^27^8^27^6^22*7^18^37^8^37^8^37^8^37^6^22*7^17^37^2^37^2^37^2^0^6^22*7^17^37*7^6^22*7^17^37^36*4^37*2^6^22*7^17^37^36*4^37*2^6^22*7^16^37^36*4^37*2^6^22*7^7^37*7^6^22*7^11^4^23^37*3^24^4^13^22*3", "12|14|0|0x0&0x0&0x0&0x0&0x0&0x0&0x0&0x1&0x1&0x1&1x5&4x3&1x5&3x&1x40&0x3&0x3&0x3&1x10&3x&0x2&0x2&0x2&1x25&0x2&0x2&0x2&0x2&1x5&4x0&1x40#18|2|3|0x3&0x3&0x3&0x3&0x3&0x3&4x1&1x20&0x1&0x1&0x1&0x1&0x1&0x1&4x3&1x20#2|11|1|1x100&3x&1x200&3x#19|10|3|1x100&3x&1x200&3x~$~18|12|4|1|0|1#13|1|7|0|0|1#16|1|6|0|0|1#3|16|1|1|0|1#3|15|1|1|0|1#2|15|1|1|0|1#2|14|3|1|1|0#2|13|3|1|1|0#3|5|1|1|0|1#3|6|1|1|0|1#3|10|1|1|0|1#2|10|1|1|0|1#4|12|3|1|1|0~$~0,objectives1,Find_the_exit_key|0,hint,Remember_to_search_every_locker_for_explosives_-_you'll_need_it|0,switch1,0|0,door1,0|0,door2,0|0,door3,0|0,door4,0|0,switch2,0|0,hasKey,0|8#1,%door1%,==,0,4|10,switch|14,10,6,1|0,door1,1|9,8|10,switch|14,10,6,4|0,door1,0|8#1,%switch2%,==,0,13|21,3,10|21,17,8|10,switch|14,3,9,62|7,5|18|27,17,9|7,10|10,switch|14,17,9,1|7,10|27,%PLAYERX%,%PLAYERY%|19|8#1,%switch1%,==,0,13|21,17,1|21,11,12|10,switch|14,17,0,66|7,5|18|27,10,12|7,10|10,switch|14,10,12,1|7,10|27,%PLAYERX%,%PLAYERY%|19|8#1,%door2%,==,0,4|10,switch|14,14,5,1|0,door2,1|9,8|10,switch|14,14,5,2|0,door2,0|8#1,%door3%,==,0,1|16,0,The_door_is_locked|8#1,%door4%,==,0,1|16,0,The_door_is_locked|8#28,3|1,%hasKey%,==,0,2|16,0,The_door_is_locked|9,8|16,0,You_use_the_key_to_unlock_the_door|10,switch|21,3,6|14,2,6,1|8#28,3|16,0,You_find_the_exit_key_in_the_desk|0,hasKey,1|21,17,12|21,17,11|8#28,0|16,0,The_locker_is_empty|21,%PLAYERX%,%PLAYERY%|8#28,0|16,0,You_find_1_C4_in_the_locker|30,1|21,%PLAYERX%,%PLAYERY%|8#28,3|16,0,You_find_1_C4_in_the_locker|30,1|21,%PLAYERX%,%PLAYERY%|8#28,0|0,v,rand(1/29)|5,v,60|0,py,%PLAYERY%|3,py,0.5|20,popcan,%PLAYERX%,%py%,3,0,%v%,0,6|10,switch|8~$~17|1|3|1#11|2|9|1#12|2|10|1#14|2|9|1#15|2|9|1#14|4|4|1#3|6|7|1#9|6|1|1#11|6|1|1#14|6|4|1#17|8|5|1#1|10|12|1#3|10|2|1#17|11|8|1#11|12|6|1#17|12|8|1#2|16|11|1~$~13|6|0#19|6|0#19|7|0#11|8|0#6|10|0#1|11|0#7|12|0#3|13|0#4|13|0#6|13|0#1|14|0#4|14|0#16|14|0#4|15|0#16|15|0#1|17|0#2|17|0~$~20x18#5x5#1x6#0#0#0#0~$~22*10^54^5*6^64^5*2^22*10^7^91*2^0^91*2^0*4^22*10^7^0*9^22*10^7^0*9^54^5*4^1^5*4^25^0*9^7^9^2^0*7^9*3^2^1^9*4^2^56^0^56^0*7^3^0*2^28^0*5^28^7^10^8^0*7^8^0*8^58^7^9^8^0*7^8^59^0*8^7^93^2^60^9*6^8^0*4^10^2^1^9^2^7^0*5^58^0*3^8^0*4^8^0*4^18^59^0*8^2^0*4^8^77^0*3^17^0*6^29^0*2^3^0*4^8^76^0*3^17^0*2^58*2^0^28^0*3^8^0*4^8^0*4^17^27^0*2^58^0*5^8^0*4^8^27^0*3^16^0*3^27^0*5^2^0*4^2^28^0*3^7^92^0*3^22*15^14^27*2^0*2^22*15", "2|7|1|1x5~$~~$~1,floor(3/3),==,0,6|1,%doorOpen%,==,0,4|14,8,3,1|14,10,3,4|0,doorOpen,1|10,switch|9,12|1,%doorOpen%,==,1,4|14,8,3,4|14,10,3,1|0,doorOpen,0|10,switch|7,3|9,0#0,hint,Guards_investigate_noises_they_hear~br~C4_makes_noises|0,doorOpen,1|7,5|15,0|8~$~~$~~$~14x8#1x3#12x1#1#0#0#1~$~54^5^21^20*2^19^5*2^12^22^54^5^1^5^7^0*7^6^22^7^0*3^7^0*7^26^15^25^0*3^3^0*2^35^0*6^3^0*3^7^0*7^24^4^23^0*3^14^0*7^6^22*5^7^9*3^2^0*3^6^22*6^7^0*6^6^22*5", "2|2|0|0x1&0x1&1x25&0x1&1x30&0x1&0x1&0x1&0x1&4x3&1x20&0x3&0x3&0x3&0x3&1x5&0x3&0x3&0x3&4x1&1x30#1|9|0|1x30&0x0&0x0&0x0&0x0&0x0&0x0&0x0&0x0&4x2&0x2&0x2&0x2&0x2~$~5|6|3|1|1|0#4|5|3|1|1|0#5|4|3|1|1|0#6|3|3|1|1|0#3|6|3|1|1|0#2|7|3|1|1|0#8|7|1|1|0|1#8|6|1|1|0|1~$~0,hint,Detonate_your_C4_at_the_right_moment_to_kill_each_guard|8~$~~$~4|3|0#7|3|0~$~10x10#5x8#5x6#1#1#0#0~$~54^5^21^20*2^19^5^15^5*2^7^0*9^14^0*9^18^0*3^58^0*2^28^0*2^17^0*9^17^0*4^27^0*4^17^0*3^27^0^27^0*3^17^0*3^8^0^27^0*3^16^0*3^8^0^27^0*3^7^0*3^2^0^27^0*3", "2|9|1|2x180&4x2&1x45&2x90&4x1&1x5&3x&1x35#11|2|3|1x40#15|4|2|1x40~$~1|13|6|0|0|0#11|1|7|0|0|0#9|6|4|1|1|0~$~0,door1,0|0,objectives1,Steal_the_computer_documents|0,door3,0|0,keycard,0|0,documents,0|8#1,%door1%,==,0,4|10,switch|14,5,7,1|0,door1,1|9,8|10,switch|14,5,7,2|0,door1,0|8#1,%door3%,==,0,4|10,switch|14,15,8,1|0,door3,1|9,8|10,switch|14,15,8,2|0,door3,0|8#16,0,The_door_is_locked|8#16,0,The_door_is_locked|8#28,0|16,0,You_find_1_C4_in_the_locker|30,1|21,%PLAYERX%,%PLAYERY%|8#28,0|16,0,The_locker_is_empty|21,%PLAYERX%,%PLAYERY%|8#28,0|16,0,You_find_a_keycard_in_the_locker|0,keycard,1|21,%PLAYERX%,%PLAYERY%|8#28,3|16,0,The_locker_is_empty|21,%PLAYERX%,%PLAYERY%|8#28,3|16,0,You_find_the_exit_keycard_in_the_locker|0,keycard,2|21,%PLAYERX%,%PLAYERY%|8#1,%keycard%,==,1,9|21,3,12|10,switch|14,3,11,62|18|7,10|10,switch|14,2,11,1|19|9,11|16,0,You_need_a_keycard_to_use_this|8#21,2,8|21,6,4|10,switch|14,2,7,62|7,5|18|27,7,4|7,10|10,switch|14,7,4,1|7,10|27,%PLAYERX%,%PLAYERY%|19|8#1,%keycard%,<=,1,2|16,0,You_need_the_exit_keycard_to_use_this|9,17|1,%keycard%,==,2,13|1,%documents%,==,0,2|16,1,You_have_the_keycard_but_you_need_the_computer_doucments_to_leave|9,17|1,%keycard%,==,2,9|1,%documents%,==,1,8|21,3,2|10,switch|14,2,2,64|18|7,10|10,switch|14,2,1,1|19|8#28,3|16,0,You_steal_the_computer_documents|0,documents,1|21,9,6|21,9,7|8~$~3|2|12|1#9|2|6|1#10|2|7|1#15|2|5|1#6|4|4|1#5|6|1|1#9|6|13|1#9|7|13|1#15|7|2|1#2|8|11|1#5|8|1|1#2|9|9|1#10|9|3|1#15|9|2|1#2|10|8|1#10|11|3|1#3|12|10|1~$~7|1|0#8|1|0#14|1|0#5|2|0#6|2|0#7|2|0#1|3|0#14|4|0#14|5|0#8|6|0#8|7|0#3|8|0#3|9|0#3|10|0#16|12|0#15|13|0#16|13|0~$~17x14#1x4#1x1#0#0#0#0~$~54^5*2^21^20^19^5*11^7^0^3^0*4^29^58^91*2^0*2^8^59^91^93^7^2^62^0*2^58^29^28^0*5^8^0*3^14^27^0*5^9*2^2^1^9*2^8^0*3^3^0*6^3^0*5^8^27^0*2^7^0*6^8^0*5^8^28^0*2^7^0*6^8^77^0*4^8^0*3^7^2^60^9^2^1^9^8^76^0*4^8^0*3^7^92^0^27^0*3^8^0*5^10^2^1^2^7^92^0^27^0*3^8^0*5^8^0*3^7^92^0^27^0*3^9*2^2^1^9*2^2^0*3^7^2^1^60^0*13^7^94^0*14^27^7^0*14^27^28", "~$~2|3|3|1|1|0#2|4|3|1|1|0#3|6|3|1|1|0#3|5|2|1|0|1#4|5|3|1|1|0#13|5|3|1|1|0#13|6|2|1|0|1#15|4|2|1|0|1#15|6|2|1|0|1#14|5|2|1|0|1#14|3|2|1|0|1#1|6|1|1|0|1#2|1|1|1|0|1#13|2|1|1|0|1#4|4|3|1|1|0#4|2|1|1|0|1#4|7|2|1|0|1#13|4|2|1|0|1#11|5|2|1|0|1#16|1|1|1|0|1~$~0,switch1,0|0,hint,Conserve_explosives_and_push_objects_into_proper_positions_before_detonating_anything~br~Activate_each_set_of_switches_to_open_doors|0,switch2,0|0,switch3,0|0,switch4,0|0,switch5,0|8#1,%switch1%,==,0,4|0,switch1,1|10,switch|21,13,1|15,6|8#1,%switch2%,==,0,4|0,switch2,1|10,switch|21,16,1|15,6|8#1,%switch3%,==,0,5|0,switch3,1|14,4,0,66|10,switch|21,4,1|15,7|8#1,%switch4%,==,0,5|0,switch4,1|14,2,0,66|10,switch|21,2,1|15,7|8#1,%switch5%,==,0,5|0,switch5,1|14,0,6,68|10,switch|21,1,6|15,7|8#1,%switch1%,==,0,1|8|1,%switch2%,==,0,1|8|18|27,7,6|7,10|14,7,6,1|10,switch|7,10|27,%PLAYERX%,%PLAYERY%|19|8#1,%switch3%,==,0,1|8|1,%switch4%,==,0,1|8|1,%switch5%,==,0,1|8|18|27,10,6|7,10|14,10,6,1|10,switch|7,10|27,%PLAYERX%,%PLAYERY%|19|8~$~2|1|4|1#4|1|3|1#13|1|1|1#16|1|2|1#1|6|5|1~$~3|1|0#15|1|0#17|2|0#17|3|0#17|4|0#17|5|0#17|6|0#1|7|0#2|7|0#11|7|0#17|7|0~$~18x8#9x1#7x1#2#0#0#0~$~54^5^64^15^64^5*5^15^5*2^64^5^15^64^5^7^2^37^58^37*2^8^37^8^37*3^8^37^2^27^37^2^7^37*4^58^8^37^8^37*3^8^37*4^27^14^37*5^8^37^8^37*3^8^37*4^27^7^37*5^8^37^8^37^10^9^2^37*4^27^7^2^37*4^8^37^8^37^2^37*6^27^66^37*5^2^1^2^37^3^37*6^27^7^58*2^37*7^2^58^37*5^27", "4|17|3|1x10&3x&1x5&4x1&0x1&0x1&0x1&0x1&1x5&3x&1x5&0x0&0x0&0x0&0x0&0x0&1x6&0x2&0x2&0x2&0x2&0x2&1x6&0x3&0x3&0x3&0x3#1|11|2|1x5&3x&1x5&4x0&0x0&0x0&0x0&0x0&0x0&0x0&0x0&1x5&3x&1x5&0x0&0x0&0x0&1x2&4x3&1x5&3x&1x5&4x2&0x2&0x2&0x2&0x2&0x2&0x2&0x2&0x2&0x2&0x2&1x15#8|7|2|1x40~$~~$~28,0|0,objectives1,Steal_the_3_secret_documents|0,objectives2,Do_not_kill_any_guards|0,door1,0|0,door2,0|0,door3,0|0,key,0|0,numDocuments,0|15,15|8#1,%door1%,==,0,4|10,switch|14,2,17,1|0,door1,1|9,8|10,switch|14,2,17,4|0,door1,0|8#1,%door2%,==,0,4|14,1,13,1|10,switch|0,door2,1|9,8|10,switch|14,1,13,2|0,door2,0|8#1,%door3%,==,0,2|16,0,locked|9,7|10,switch|14,7,11,4|14,7,12,67|0,door3,0|8#1,%door3%,==,0,5|14,7,11,1|14,7,12,64|10,switch|0,door3,1|9,10|10,switch|14,7,11,4|14,7,12,63|0,door3,0|8#2,numDocuments,1|0,string,You_have_found_|2,string,%numDocuments%|2,string,_out_of_3_documents.|16,0,%string%|8#14,3,12,87|15,5|21,%PLAYERX%,%PLAYERY%|8#14,5,9,66|14,8,9,1|14,8,6,1|10,switch|21,%PLAYERX%,%PLAYERY%|8#16,0,Nothing_of_use_in_here|21,%PLAYERX%,%PLAYERY%|8#14,0,1,82|15,5|21,%PLAYERX%,%PLAYERY%|8#14,6,3,76|15,5|21,%PLAYERX%,%PLAYERY%|8#16,0,You_found_a_keycard|0,key,1|21,%PLAYERX%,%PLAYERY%|8#10,switch|14,4,5,1|21,3,5|21,5,5|8#28,3|0,v,rand(1/29)|5,v,60|0,px,%PLAYERX%|3,px,0.5|20,popcan2,%px%,%PLAYERY%,2.5,%v%,0,0,6|10,switch|8#1,%numDocuments%,==,3,7|1,%key%,==,1,4|14,6,0,1|14,5,1,64|13|9,7|16,0,You_need_a_keycard.|9,26|1,%key%,==,1,9|0,string,You_need_|0,tempNum,3|3,tempNum,%numDocuments%|2,string,%tempNum%|2,string,_more_document|1,%tempNum%,>,1,1|2,string,s|16,0,%string%|9,26|0,string,You_need_a_keycard_and__|0,tempNum,3|3,tempNum,%numDocuments%|2,string,%tempNum%|2,string,_more_document|1,%tempNum%,>,1,1|2,string,s|16,0,%string%|8#1,%NMECOUNT%,==,2,1|24|7,5~$~1|1|9|1#4|1|11|1#6|1|14|1#7|3|10|1#4|7|8|1#4|8|8|1#5|10|7|1#1|12|2|1#4|12|6|1#8|12|4|1#1|14|2|1#1|17|1|1#3|17|1|1#4|19|13|1~$~~$~10x20#1x18#6x0#0#5#0#0~$~70^75^87^2^91^2^1^9*2^2^84^0^88^0*2^62^0*3^7^76^0*4^8^0*3^7^8^0*4^8^79^0*2^7^8^0*3^10^8^76^0*2^7^8^0*3^10^8^0*3^7^8^0^7^9*2^2^21^19^1^25^8^0^7^92^0^27^28^0*2^7^8^0^7^92^0*5^7^8^0^7^5*2^64^5*2^1^25^8^0^7^70^71^0*2^2^0*2^8^0^7^69^0*3^3^0*2^8^0^14^90^0*3^62^0*2^8^1^25^0*4^8^0*2^8^0^7^5*4^8^0*2^8^0^18^27^28^29^0^2^0*2^8^0^16^0*7^8^0^3^0*7^8^0^7^0*7^2^1^25^94^0*6", "3|17|0|1x10#9|11|3|2x280#19|4|3|2x315#10|7|0|2x15#2|7|0|1x10#12|14|0|2x45~$~1|8|3|1|1|0#1|9|3|1|1|0#1|10|3|1|1|0#1|13|3|1|1|0#6|18|3|1|1|0#7|18|3|1|1|0#8|18|3|1|1|0#9|17|3|1|1|0#10|16|3|1|1|0#10|15|3|1|1|0#10|14|3|1|1|0#10|13|3|1|1|0#10|12|3|1|1|0#11|11|3|1|1|0#11|10|3|1|1|0#11|9|3|1|1|0#12|7|3|1|1|0#13|7|3|1|1|0#16|5|3|1|1|0#17|5|3|1|1|0#3|8|3|1|1|0#4|8|3|1|1|0#5|8|3|1|1|0#5|7|3|1|1|0#6|6|3|1|1|0#7|6|3|1|1|0#8|6|3|1|1|0#9|6|3|1|1|0#11|14|3|1|1|0#18|6|3|1|1|0#12|8|3|1|1|0#5|17|3|1|1|0#4|16|3|1|1|0#3|15|3|1|1|0#2|14|3|1|1|0#17|7|3|1|1|0#1|11|3|1|1|0#5|1|3|1|1|0#11|3|3|1|1|0#17|1|3|1|1|0#7|14|3|1|1|0#2|4|3|1|1|0#3|12|3|1|1|0#15|7|3|1|1|0#2|9|3|1|1|0~$~28,0|16,0,You_find_1_C4_in_the_locker|30,1|21,%PLAYERX%,%PLAYERY%|8#0,hint,Tightly_maneuvre_around_the_guards_field_of_vision~br~Arrange_the_explosive_barrels_so_they_will_let_you_assassinate_each_guard|8~$~19|8|0|1~$~1|1|0#19|3|0#18|4|0#12|5|0#19|5|0#2|6|0#10|6|0#1|7|0#3|7|0#9|7|0#11|7|0#2|8|0#10|8|0#3|9|0#9|10|0#15|10|0#8|11|0#10|11|0#9|12|0#12|13|0#13|14|0#5|15|0#12|15|0#3|16|0#2|17|0#4|17|0#3|18|0~$~20x20#15x1#18x10#0#1#0#1~$~54^5*3^15^21^20*5^19^15^21^20^19^5^15^5*2^7^58^0*18^7^0*19^7^0*18^27^14^0*17^27^0^18^0*11^58^0*6^27^17^0^27^0*7^27^0*9^17^27^0^27^0*5^27^0^27^0*7^91^16^0^27^0*7^27^0*9^7^0*2^58^0*16^14^0*8^27^0*5^58^0*4^7^0*7^27^0^27^0*9^18^0*8^27^0*4^22*6^17^0*11^27^0^22*6^17^0*12^27^22*6^16^0*4^58^0*6^27^0^22*6^7^0*2^27^0*10^22*6^14^0^27^0^27^0*9^22*6^7^0*2^27^0*10^22*6^7^0*13^22*6", "5|8|0|1x10#5|13|1|1x10#18|9|0|1x10~$~18|6|2|1|0|1#6|14|3|1|1|0#2|17|3|1|1|0#2|5|3|1|1|0#4|12|1|1|0|1#9|10|2|1|0|1#19|8|4|1|0|1#1|2|7|1|1|0~$~0,switch1,0|0,switch2,0|0,hint,Youre_on_your_own_with_this_one|0,doorOpen,1|7,5|15,1|8#1,floor(4/4),==,1,5|1,%doorOpen%,==,1,3|14,18,11,38|0,doorOpen,0|10,switch|9,10|1,%doorOpen%,==,0,3|14,18,11,2|0,doorOpen,1|10,switch|7,3|9,0#1,%switch1%,==,0,5|0,switch1,1|10,switch|21,9,9|14,9,8,62|15,4|8#1,%switch2%,==,0,5|0,switch2,1|10,switch|21,1,9|14,0,9,68|15,4|8#1,%switch1%,==,0,1|8|1,%switch2%,==,0,1|8|14,5,9,1|10,switch|8~$~1|9|3|1#9|9|2|1~$~10|1|0#11|1|0#18|1|0#19|1|0#19|2|0#10|3|0#17|3|0#12|4|0#18|5|0#16|6|0#7|8|0#8|8|0#17|14|0#19|14|0#1|16|0#1|17|0#1|18|0~$~20x19#2x3#5x10#1#3#0#0~$~54^5*3^12^22*4^54^5^21^20*4^19^5*3^7^91*3^6^22*4^7^27*2^37*6^29^28^18^36*3^26^15^5*2^15^25^37*9^27^17^37*9^58^37*6^58^37*2^17^37*3^35^37*7^58^37*7^16^37*5^9^2^37*10^58^37^7^37*13^36*2^58^36^37*2^7^5*4^37^5*2^15^5^15^5^8^37^36^24^23^36^37*2^7^36*3^8^37^8^28^27^60^36*2^8^37^36^6^14^36^37*2^66^36*3^8^1^8^36*5^8^37^36^26^25^36^37*2^7^36*3^8^0^10^9^2^36^5*2^8^37^36*4^37*2^14^36^2^36^2^5^2^36*5^9*5^2^1^2^7^36*5^33*11^36*3^7^9*3^2^36^33*14^7^0^33*15^27^33^28^7^0^36*5^33*6^22*7^14^59^36^9*2^2^36^33*5^34^22*7^7^58^36*5^33*4^34*2^22*7^7^58^33*8^34*3^22*7", "4|13|0|1x40&3x&1x90&3x#12|27|0|0x0&0x0&0x0&0x0&0x0&0x0&0x0&0x0&0x0&0x0&0x0&1x40&3x&1x20&0x2&0x2&0x2&0x2&0x2&0x2&0x2&0x2&0x2&0x2&0x2&1x30#17|21|1|x#27|19|0|1x20&0x2&0x2&0x2&0x2&0x2&0x2&0x2&0x2&1x10&2x270&0x3&0x3&0x3&0x3&0x3&0x3&0x3&0x3&0x3&0x3&1x10&3x&1x5&2x90&0x1&0x1&0x1&0x1&0x1&0x1&0x1&0x1&0x1&0x1&1x5&2x0&0x0&0x0&0x0&0x0&0x0&0x0&0x0&0x0&1x50&3x#23|5|2|1x60&3x&1x140&3x#18|3|0|1x40&0x2&0x2&0x2&0x2&0x2&0x2&2x270&4x3&1x60&0x0&0x0&0x0&0x0&0x0&0x0~$~8|4|6|1|0|1#8|9|5|1|0|1#8|7|9|1|0|1#5|5|7|1|0|1#4|7|4|1|0|1#12|11|6|1|0|1#11|11|8|1|0|1#14|12|3|1|1|1#13|12|3|1|1|1#13|13|3|1|1|1#12|13|3|1|1|1#11|13|3|1|1|1#6|14|2|1|0|1#17|9|4|1|0|1#19|2|9|1|0|1#4|19|8|1|0|1#14|11|3|1|1|1#14|10|3|1|1|1#12|14|3|1|1|1#21|14|2|1|0|1#23|13|2|1|0|1#5|22|5|1|0|1#24|30|3|1|1|1#26|28|3|1|1|1#25|32|3|1|1|1#14|13|2|1|0|1#16|16|2|1|0|1#16|4|6|1|0|1~$~28,3|16,0,The_locker_is_empty|21,%PLAYERX%,%PLAYERY%|8#28,0|0,v,rand(1/29)|5,v,60|0,py,%PLAYERY%|3,py,0.5|20,popcan,%PLAYERX%,%py%,3,0,%v%,0,6|10,switch|8#28,3|0,v,rand(1/29)|5,v,60|0,px,%PLAYERX%|3,px,0.5|20,popcan2,%px%,%PLAYERY%,2.5,%v%,0,0,6|10,switch|8#28,0|16,0,The_locker_is_empty|21,%PLAYERX%,%PLAYERY%|8#1,%doorOpen%,==,0,4|14,15,7,1|0,doorOpen,1|10,switch|9,8|14,15,7,4|0,doorOpen,0|10,switch|8#0,objectives1,Congratulations_you_win!|0,objectives2,Play_around_in_this_bonus_level!|0,objectives3,Coming_Soon:_Stealth_Hunter_2|0,hint,This_isnt_a_real_level~c~_so_there_are_no_hints_for_winning~br~~br~but_there_IS_a_hidden_switch_somewhere_behind_some_crates.|0,doorOpen,0|0,mainDoorOpen,0|0,HdoorOpen,0|0,documents,0|0,poisoned,0|25,17,2|14,16,12,3|15,15|8#1,%mainDoorOpen%,==,0,5|14,6,17,1|14,5,17,62|0,mainDoorOpen,1|10,switch|9,10|14,6,17,2|14,5,17,61|0,mainDoorOpen,0|10,switch|28,0|8#28,0|10,gas|16,0,Its_full_of_poisonous_gas!|16,0,You_have_10_seconds_to_find_an_antidote|0,poisoned,1|26,10,8|21,%PLAYERX%,%PLAYERY%|8#24|8#18|27,7,7|7,10|12,7,7|7,20|27,%PLAYERX%,%PLAYERY%|16,0,Whoops!|19|8#28,0|1,%poisoned%,==,1,5|16,0,You_found_some_antidote!|0,poisoned,0|34|21,%PLAYERX%,%PLAYERY%|9,8|16,0,You_find_poison_antidote~c~_but_you_are_not_poisoned|8#1,%documents%,==,1,4|13|14,21,2,64|21,%PLAYERX%,%PLAYERY%|9,6|16,0,You_cannot_use_this_until_you_have_the_secret_documents|8#16,0,The_computer_screen_says_%NMECOUNT%_guards_are_still_alive|8#21,16,2|21,17,2|16,0,You_take_the_secret_documents_on_the_table|0,documents,1|14,16,1,69|14,17,1,70|25,22,2|8#28,3|1,%C4AMOUNT%,<,99,5|16,0,It_is_full_of_C4!_You_take_as_much_as_you_can|0,tempNum,99|3,tempNum,%C4AMOUNT%|30,%tempNum%|9,8|16,0,It_is_full_of_C4!_But_you_cant_hold_any_more|8#1,floor(18/16),==,1,7|1,%HdoorOpen%,==,0,5|14,17,12,37|14,18,12,37|14,19,12,37|0,HdoorOpen,1|10,switch|9,14|1,%HdoorOpen%,==,1,5|14,17,12,3|14,18,12,3|14,19,12,3|0,HdoorOpen,0|10,switch|7,3#18|14,21,12,62|0,randX,rand(1/27)|0,randY,rand(1/30)|0,i,0|27,%randX%,%randY%|7,10|2,i,1|0,randX2,rand(0/2)|3,randX2,1|2,randX2,%randX%|0,randY2,rand(0/2)|3,randY2,1|2,randY2,%randY%|12,%randX2%,%randY2%|1,%i%,<,10,2|7,2|9,7|7,20|27,%PLAYERX%,%PLAYERY%|7,5|14,21,12,61|19|8#28,0|16,0,This_locker_is_full_of_garbage~c~_yuck|21,%PLAYERX%,%PLAYERY%|8~$~9|2|3|1#10|2|17|1#11|2|3|1#12|2|3|1#13|2|7|1#14|2|10|1#16|2|13|1#17|2|13|1#18|2|12|1#19|2|12|1#22|2|11|1#2|3|0|1#2|4|14|1#2|5|0|1#1|7|9|1#14|7|4|1#16|7|4|1#17|9|12|1#17|10|12|1#2|11|2|1#21|13|16|1#16|14|1|1#5|18|6|1~$~4|1|0#5|1|0#6|1|0#7|1|0#8|1|0#5|2|0#6|2|0#7|2|0#9|3|0#9|4|0#1|6|0#5|6|0#6|6|0#7|6|0#8|6|0#3|7|0#3|8|0#7|8|0#8|8|0#13|10|0#13|11|0#22|11|0#23|11|0#11|12|0#12|12|0#22|12|0#23|12|0#20|13|0#21|13|0#22|13|0#23|13|0#10|18|0#23|20|0~$~30x35#1x25#22x1#99#5#0#5~$~54^5*2^21^20*4^19^5*8^15^5*7^22*5^7^0*3^27^29^28^27^57^91*6^8^72^73^70^71^0^2^0*2^43^22*5^7^0*4^58^27^57^0*7^8^0*5^62^0*2^42^22*5^7^92^0*7^89^0*5^8^0*5^8^0*2^52^48^49^48^0^22^7^92^0*7^90^0*5^8^0*5^8^0*6^42^22^7^92^0*13^8^0*5^8^0*6^43^22^7^59^0*3^84^83^70^71^0*6^2^0*5^8^0*6^42^22^67^0*2^75^0*11^3^0*5^8^0*6^42^22^7^0*2^74^0*3^68^69^0*6^8^0*5^8^0*6^43^22^14^0*14^8^77^0*4^8^0*6^42^22^7^0*12^87^0^8^76^0*4^10^9*2^2^0*2^9^2^22^7^94^0*11^88^0^8^0*5^2^28^29^0*5^22^7^0*10^84^82^0*2^9*5^2^60^27^29^0*5^22^7^0*15^93^0*3^27^28^29^0*6^22^7^0*28^22^7^0*17^36^0*10^22^7^0*16^36^35^36^0*9^22^7^9*3^2^60^1^9*2^8^0*8^36^0*6^7^2^36^2^39^22*2^7^0*6^8^28^0*14^7^36*3^38^22*2^7^0*6^8^0*5^54^5*9^25^36*3^38^22*2^14^0^81^82^0*3^8^0*5^7^31^32*6^29^32^36*4^38^22*2^7^0*6^8^0*5^7^30^33*3^34^33*5^36*3^38^54^5^25^0*6^8^0*5^7^30^33*2^34*3^33*7^38^7^0*8^8^0*5^7^30^34*5^33*7^38^7^0*8^8^0*5^7^34*5^33*2^30^33*3^31^33^38^3^0*8^8^0*5^7^30^33^34*2^33*9^38^7^0*8^8^0*5^2^36*2^33*11^38^7^0*8^8^0*5^36*3^33*3^30^31^33*3^30^33*2^38^22*9^8^0*5^2^36*2^33*11^38^22*9^8^0*5^7^30^33*3^32^33*6^31^33^38^22*9^8^0*5^7^30^33*3^34*2^33*3^30^33*3^38^22*9^9*6^2^30^34*5^33*7^38^22*15^7^34*4^33*2^31^33*6^38^22*15^7^30^33*12^38^22*15^7^39*13^41");
_global.levels2.push("4|13|0|1x40&3x&1x90&3x#12|27|0|0x0&0x0&0x0&0x0&0x0&0x0&0x0&0x0&0x0&0x0&0x0&1x40&3x&1x20&0x2&0x2&0x2&0x2&0x2&0x2&0x2&0x2&0x2&0x2&0x2&1x30#17|21|1|x#27|19|0|1x20&0x2&0x2&0x2&0x2&0x2&0x2&0x2&0x2&1x10&2x270&0x3&0x3&0x3&0x3&0x3&0x3&0x3&0x3&0x3&0x3&1x10&3x&1x5&2x90&0x1&0x1&0x1&0x1&0x1&0x1&0x1&0x1&0x1&0x1&1x5&2x0&0x0&0x0&0x0&0x0&0x0&0x0&0x0&0x0&1x50&3x#23|5|2|1x60&3x&1x140&3x#18|3|0|1x40&0x2&0x2&0x2&0x2&0x2&0x2&2x270&4x3&1x60&0x0&0x0&0x0&0x0&0x0&0x0~$~8|4|6|1|0|1#8|9|5|1|0|1#8|7|9|1|0|1#5|5|7|1|0|1#4|7|4|1|0|1#12|11|6|1|0|1#11|11|8|1|0|1#14|12|3|1|1|1#13|12|3|1|1|1#13|13|3|1|1|1#12|13|3|1|1|1#11|13|3|1|1|1#6|14|2|1|0|1#17|9|4|1|0|1#19|2|9|1|0|1#4|19|8|1|0|1#14|11|3|1|1|1#14|10|3|1|1|1#12|14|3|1|1|1#21|14|2|1|0|1#23|13|2|1|0|1#5|22|5|1|0|1#24|30|3|1|1|1#26|28|3|1|1|1#25|32|3|1|1|1#14|13|2|1|0|1#16|16|2|1|0|1#16|4|6|1|0|1~$~28,3|16,0,The_locker_is_empty|21,%PLAYERX%,%PLAYERY%|8#28,0|0,v,rand(1/29)|5,v,60|0,py,%PLAYERY%|3,py,0.5|20,popcan,%PLAYERX%,%py%,3,0,%v%,0,6|10,switch|8#28,3|0,v,rand(1/29)|5,v,60|0,px,%PLAYERX%|3,px,0.5|20,popcan2,%px%,%PLAYERY%,2.5,%v%,0,0,6|10,switch|8#28,0|16,0,The_locker_is_empty|21,%PLAYERX%,%PLAYERY%|8#1,%doorOpen%,==,0,4|14,15,7,1|0,doorOpen,1|10,switch|9,8|14,15,7,4|0,doorOpen,0|10,switch|8#0,objectives1,Test_Stealth_Hunter_for_bugs|0,objectives2,Steal_the_secret_documents|0,hint,This_isnt_a_real_level~c~_so_there_are_no_hints_for_winning~br~~br~but_there_IS_a_hidden_switch_somewhere_behind_some_crates.|0,doorOpen,0|0,mainDoorOpen,0|0,HdoorOpen,0|0,documents,0|0,poisoned,0|25,17,2|14,16,12,3|15,15|8#1,%mainDoorOpen%,==,0,5|14,6,17,1|14,5,17,62|0,mainDoorOpen,1|10,switch|9,10|14,6,17,2|14,5,17,61|0,mainDoorOpen,0|10,switch|28,0|8#28,0|10,gas|16,0,Its_full_of_poisonous_gas!|16,0,You_have_10_seconds_to_find_an_antidote|0,poisoned,1|26,10,8|21,%PLAYERX%,%PLAYERY%|8#24|8#18|27,7,7|7,10|12,7,7|7,20|27,%PLAYERX%,%PLAYERY%|16,0,Whoops!|19|8#28,0|1,%poisoned%,==,1,5|16,0,You_found_some_antidote!|0,poisoned,0|34|21,%PLAYERX%,%PLAYERY%|9,8|16,0,You_find_poison_antidote~c~_but_you_are_not_poisoned|8#1,%documents%,==,1,4|13|14,21,2,64|21,%PLAYERX%,%PLAYERY%|9,6|16,0,You_cannot_use_this_until_you_have_the_secret_documents|8#16,0,The_computer_screen_says_%NMECOUNT%_guards_are_still_alive|8#21,16,2|21,17,2|16,0,You_take_the_secret_documents_on_the_table|0,documents,1|14,16,1,69|14,17,1,70|25,22,2|8#28,3|1,%C4AMOUNT%,<,99,5|16,0,It_is_full_of_C4!_You_take_as_much_as_you_can|0,tempNum,99|3,tempNum,%C4AMOUNT%|30,%tempNum%|9,8|16,0,It_is_full_of_C4!_But_you_cant_hold_any_more|8#1,floor(18/16),==,1,7|1,%HdoorOpen%,==,0,5|14,17,12,37|14,18,12,37|14,19,12,37|0,HdoorOpen,1|10,switch|9,14|1,%HdoorOpen%,==,1,5|14,17,12,3|14,18,12,3|14,19,12,3|0,HdoorOpen,0|10,switch|7,3#18|14,21,12,62|0,randX,rand(1/27)|0,randY,rand(1/30)|0,i,0|27,%randX%,%randY%|7,10|2,i,1|0,randX2,rand(0/2)|3,randX2,1|2,randX2,%randX%|0,randY2,rand(0/2)|3,randY2,1|2,randY2,%randY%|12,%randX2%,%randY2%|1,%i%,<,10,2|7,2|9,7|7,20|27,%PLAYERX%,%PLAYERY%|7,5|14,21,12,61|19|8#28,0|16,0,This_locker_is_full_of_garbage~c~_yuck|21,%PLAYERX%,%PLAYERY%|8~$~9|2|3|1#10|2|17|1#11|2|3|1#12|2|3|1#13|2|7|1#14|2|10|1#16|2|13|1#17|2|13|1#18|2|12|1#19|2|12|1#22|2|11|1#2|3|0|1#2|4|14|1#2|5|0|1#1|7|9|1#14|7|4|1#16|7|4|1#17|9|12|1#17|10|12|1#2|11|2|1#21|13|16|1#16|14|1|1#5|18|6|1~$~4|1|0#5|1|0#6|1|0#7|1|0#8|1|0#5|2|0#6|2|0#7|2|0#9|3|0#9|4|0#1|6|0#5|6|0#6|6|0#7|6|0#8|6|0#3|7|0#3|8|0#7|8|0#8|8|0#13|10|0#13|11|0#22|11|0#23|11|0#11|12|0#12|12|0#22|12|0#23|12|0#20|13|0#21|13|0#22|13|0#23|13|0#10|18|0#23|20|0~$~30x35#1x25#22x1#99#5#0#5~$~54^5*2^21^20*4^19^5*8^15^5*7^22*5^7^0*3^27^29^28^27^57^91*6^8^72^73^70^71^0^2^0*2^43^22*5^7^0*4^58^27^57^0*7^8^0*5^62^0*2^42^22*5^7^92^0*7^89^0*5^8^0*5^8^0*2^52^48^49^48^0^22^7^92^0*7^90^0*5^8^0*5^8^0*6^42^22^7^92^0*13^8^0*5^8^0*6^43^22^7^59^0*3^84^83^70^71^0*6^2^0*5^8^0*6^42^22^67^0*2^75^0*11^3^0*5^8^0*6^42^22^7^0*2^74^0*3^68^69^0*6^8^0*5^8^0*6^43^22^14^0*14^8^77^0*4^8^0*6^42^22^7^0*12^87^0^8^76^0*4^10^9*2^2^0*2^9^2^22^7^94^0*11^88^0^8^0*5^2^28^29^0*5^22^7^0*10^84^82^0*2^9*5^2^60^27^29^0*5^22^7^0*15^93^0*3^27^28^29^0*6^22^7^0*28^22^7^0*17^36^0*10^22^7^0*16^36^35^36^0*9^22^7^9*3^2^60^1^9*2^8^0*8^36^0*6^7^2^36^2^39^22*2^7^0*6^8^28^0*14^7^36*3^38^22*2^7^0*6^8^0*5^54^5*9^25^36*3^38^22*2^14^0^81^82^0*3^8^0*5^7^31^32*6^29^32^36*4^38^22*2^7^0*6^8^0*5^7^30^33*3^34^33*5^36*3^38^54^5^25^0*6^8^0*5^7^30^33*2^34*3^33*7^38^7^0*8^8^0*5^7^30^34*5^33*7^38^7^0*8^8^0*5^7^34*5^33*2^30^33*3^31^33^38^3^0*8^8^0*5^7^30^33^34*2^33*9^38^7^0*8^8^0*5^2^36*2^33*11^38^7^0*8^8^0*5^36*3^33*3^30^31^33*3^30^33*2^38^22*9^8^0*5^2^36*2^33*11^38^22*9^8^0*5^7^30^33*3^32^33*6^31^33^38^22*9^8^0*5^7^30^33*3^34*2^33*3^30^33*3^38^22*9^9*6^2^30^34*5^33*7^38^22*15^7^34*4^33*2^31^33*6^38^22*15^7^30^33*12^38^22*15^7^39*13^41");
_global.levelProgress = 0;
_global.menuFrame = 1;
_global.autoSGM = true;
_global.FPS = false;
_global.SGM = false;
_global.SFX = true;
_global.music = true;
_global.particles = true;
_global.upKey = 38;
_global.downKey = 40;
_global.rightKey = 39;
_global.leftKey = 37;
_global.plantC4key = 90;
_global.detonateC4key = 88;
_global.actionKey = 32;
_global.mainFocus = 0;
SO = SharedObject.getLocal("wonpwnSHNG");
gotoAndStop ("menu");
Frame 5
_global.mainFocus = 0;
menu.setMask(wiper);
wiper.gotoAndPlay("reveal");
_quality = "BEST";
Frame 10
gotoAndStop ("uhoh");
Frame 11
stop();
_quality = "LOW";
var window = (new flash.geom.Rectangle(0, 0, 640, 400));
Game = new MapController(_global.currentLevel);
Game.moveBG();
_global.mainFocus = 6;
_global.Game = Game;
Frame 12
gotoAndStop ("uhoh");
Frame 15
stopAllSounds();
Frame 18
gotoAndStop ("uhoh");
Frame 19
gotoAndStop ("game");
Frame 20
_quality = "BEST";
Symbol 150 MovieClip [tile0] Frame 1
stop();
Symbol 161 MovieClip [levelBar] Frame 1
stop();
Symbol 187 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 100
stop();
stop();
percent = "100%";
Symbol 198 MovieClip Frame 1
stop();
Symbol 337 MovieClip [guy] Frame 93
stoppable = true;
Symbol 337 MovieClip [guy] Frame 114
paused = false;
ref.inMotion = false;
gotoAndStop ("NS");
stoppable = false;
Symbol 337 MovieClip [guy] Frame 118
stoppable = true;
Symbol 337 MovieClip [guy] Frame 139
paused = false;
ref.inMotion = false;
gotoAndStop ("SS");
stoppable = false;
Symbol 337 MovieClip [guy] Frame 142
stoppable = true;
Symbol 337 MovieClip [guy] Frame 145
ref.wallTap2();
Symbol 337 MovieClip [guy] Frame 146
paused = false;
gotoAndStop ("SWSS");
stoppable = false;
Symbol 337 MovieClip [guy] Frame 149
stoppable = true;
Symbol 337 MovieClip [guy] Frame 152
ref.wallTap2();
Symbol 337 MovieClip [guy] Frame 153
paused = false;
gotoAndStop ("NWSS");
stoppable = false;
Symbol 337 MovieClip [guy] Frame 157
stoppable = true;
Symbol 337 MovieClip [guy] Frame 161
ref.dropC4();
Symbol 337 MovieClip [guy] Frame 166
paused = false;
gotoAndStop ("SS");
stoppable = false;
Symbol 337 MovieClip [guy] Frame 168
stoppable = true;
Symbol 337 MovieClip [guy] Frame 172
ref.dropC4();
Symbol 337 MovieClip [guy] Frame 177
paused = false;
gotoAndStop ("NS");
stoppable = false;
Symbol 337 MovieClip [guy] Frame 181
stoppable = true;
Symbol 337 MovieClip [guy] Frame 186
stop();
stoppable = false;
Symbol 337 MovieClip [guy] Frame 190
stoppable = true;
Symbol 337 MovieClip [guy] Frame 195
stop();
stoppable = false;
Symbol 401 MovieClip [altTile] Frame 1
stop();
Symbol 432 MovieClip Frame 1
stop();
Symbol 432 MovieClip Frame 31
gotoAndStop (1);
Symbol 432 MovieClip Frame 71
gotoAndStop (1);
Symbol 552 MovieClip [enemy] Frame 5
if (_visible) {
ref.footstep(1);
}
Symbol 552 MovieClip [enemy] Frame 13
if (_visible) {
ref.footstep(2);
}
Symbol 552 MovieClip [enemy] Frame 20
ref.angle = ref.angle - 10;
Symbol 552 MovieClip [enemy] Frame 21
ref.angle = ref.angle - 10;
Symbol 552 MovieClip [enemy] Frame 22
ref.angle = ref.angle - 10;
Symbol 552 MovieClip [enemy] Frame 23
ref.angle = ref.angle - 10;
Symbol 552 MovieClip [enemy] Frame 28
ref.angle = ref.angle + 10;
Symbol 552 MovieClip [enemy] Frame 29
ref.angle = ref.angle + 10;
Symbol 552 MovieClip [enemy] Frame 30
ref.angle = ref.angle + 10;
Symbol 552 MovieClip [enemy] Frame 31
ref.angle = ref.angle + 10;
Symbol 552 MovieClip [enemy] Frame 32
ref.angle = ref.angle + 20;
Symbol 552 MovieClip [enemy] Frame 33
ref.angle = ref.angle + 20;
Symbol 552 MovieClip [enemy] Frame 38
ref.angle = ref.angle - 20;
Symbol 552 MovieClip [enemy] Frame 39
ref.angle = ref.angle - 20;
Symbol 552 MovieClip [enemy] Frame 40
ref.angle = ref.angle + 1;
Symbol 552 MovieClip [enemy] Frame 41
ref.angle = ref.oldAngle;
ref.lookAroundCounter = 0;
ref.stand(ref.dir);
stoppable = false;
Symbol 552 MovieClip [enemy] Frame 49
if (_visible) {
ref.footstep(1);
}
Symbol 552 MovieClip [enemy] Frame 57
if (_visible) {
ref.footstep(2);
}
Symbol 552 MovieClip [enemy] Frame 63
ref.angle = ref.angle - 10;
Symbol 552 MovieClip [enemy] Frame 64
ref.angle = ref.angle - 10;
Symbol 552 MovieClip [enemy] Frame 65
ref.angle = ref.angle - 10;
Symbol 552 MovieClip [enemy] Frame 66
ref.angle = ref.angle - 10;
Symbol 552 MovieClip [enemy] Frame 71
ref.angle = ref.angle + 10;
Symbol 552 MovieClip [enemy] Frame 72
ref.angle = ref.angle + 10;
Symbol 552 MovieClip [enemy] Frame 73
ref.angle = ref.angle + 10;
Symbol 552 MovieClip [enemy] Frame 74
ref.angle = ref.angle + 10;
Symbol 552 MovieClip [enemy] Frame 75
ref.angle = ref.angle + 20;
Symbol 552 MovieClip [enemy] Frame 76
ref.angle = ref.angle + 20;
Symbol 552 MovieClip [enemy] Frame 81
ref.angle = ref.angle - 20;
Symbol 552 MovieClip [enemy] Frame 82
ref.angle = ref.angle - 20;
Symbol 552 MovieClip [enemy] Frame 83
ref.angle = ref.angle + 1;
Symbol 552 MovieClip [enemy] Frame 84
ref.angle = ref.oldAngle;
ref.lookAroundCounter = 0;
ref.stand(ref.dir);
stoppable = false;
Symbol 552 MovieClip [enemy] Frame 107
x = x + ((ref.tx - x) / 3);
y = y + ((ref.ty - y) / 3);
qmark.gotoAndStop("emark");
stoppable = true;
Symbol 552 MovieClip [enemy] Frame 108
x = x + ((ref.tx - x) / 3);
y = y + ((ref.ty - y) / 3);
Symbol 552 MovieClip [enemy] Frame 109
x = x + ((ref.tx - x) / 3);
y = y + ((ref.ty - y) / 3);
Symbol 552 MovieClip [enemy] Frame 113
_root.Game.soundController.playSoundPan("groan", _x, false);
Symbol 552 MovieClip [enemy] Frame 118
_root.Game.soundController.playSoundPan("necksnap", _x, false);
Symbol 552 MovieClip [enemy] Frame 122
qmark.gotoAndStop(1);
Symbol 552 MovieClip [enemy] Frame 127
_root.Game.soundController.playSoundPan("fall", _x, false);
Symbol 552 MovieClip [enemy] Frame 128
stop();
dead = true;
_root.Game.scriptController.VARIABLES.NMECOUNT--;
stoppable = false;
Symbol 552 MovieClip [enemy] Frame 132
x = x + ((ref.tx - x) / 3);
y = y + ((ref.ty - y) / 3);
qmark.gotoAndStop("emark");
stoppable = true;
Symbol 552 MovieClip [enemy] Frame 133
x = x + ((ref.tx - x) / 3);
y = y + ((ref.ty - y) / 3);
Symbol 552 MovieClip [enemy] Frame 134
x = x + ((ref.tx - x) / 3);
y = y + ((ref.ty - y) / 3);
Symbol 552 MovieClip [enemy] Frame 138
_root.Game.soundController.playSoundPan("groan", _x, false);
Symbol 552 MovieClip [enemy] Frame 143
_root.Game.soundController.playSoundPan("necksnap", _x, false);
Symbol 552 MovieClip [enemy] Frame 147
qmark.gotoAndStop(1);
Symbol 552 MovieClip [enemy] Frame 152
_root.Game.soundController.playSoundPan("fall", _x, false);
Symbol 552 MovieClip [enemy] Frame 153
stop();
dead = true;
_root.Game.scriptController.VARIABLES.NMECOUNT--;
stoppable = false;
Symbol 561 MovieClip [nmeBlip] Frame 1
stop();
Symbol 647 Button
on (keyPress "<Space>") {
gotoAndStop (39);
}
Symbol 675 Button
on (release) {
_root.Game.cleanup();
_root.gotoAndStop("game");
_root.missionFailedWindow.removeMovieClip();
}
Symbol 678 Button
on (release) {
_root.Game.cleanup();
_root.gotoAndStop("menu");
_root.missionFailedWindow.removeMovieClip();
}
Symbol 679 Button
on (release) {
_root.gotoAndStop("game");
_root.missionFailedWindow.removeMovieClip();
}
Symbol 680 Button
on (release) {
_root.Game.cleanup();
delete _global.rootFrame;
delete _global.menuFunc;
_global.menuFrame = "main";
_root.gotoAndStop("menu");
_root.missionFailedWindow.removeMovieClip();
}
Symbol 681 Button
on (release) {
_root.Game.cleanup();
_root.gotoAndStop("bouncer");
_root.missionFailedWindow.removeMovieClip();
}
on (keyPress "<Space>") {
_root.Game.cleanup();
_root.gotoAndStop("bouncer");
_root.missionFailedWindow.removeMovieClip();
}
Symbol 682 MovieClip Frame 39
stop();
Symbol 687 Button
on (keyPress "<Space>") {
gotoAndStop (39);
}
Symbol 721 Button
on (release) {
_root.Game.cleanup();
if (_global.currentLevel < _global.levels.length) {
_root.gotoAndStop("bouncer");
_root.missionCompleteWindow.removeMovieClip();
} else {
_global.menuFrame = "main";
delete _global.menuFunc;
_root.gotoAndStop("menu");
_root.missionCompleteWindow.removeMovieClip();
}
}
on (keyPress "<Space>") {
_root.Game.cleanup();
if (_global.currentLevel < _global.levels.length) {
_root.gotoAndStop("bouncer");
_root.missionCompleteWindow.removeMovieClip();
} else {
_global.menuFrame = "main";
delete _global.menuFunc;
_root.gotoAndStop("menu");
_root.missionCompleteWindow.removeMovieClip();
}
}
Symbol 722 MovieClip Frame 39
stop();
Symbol 760 MovieClip [explosion] Frame 8
_root.Game.removeScrollable(this);
this.removeMovieClip();
Symbol 788 MovieClip [explosionSGM] Frame 2
_root.Game.removeScrollable(this);
this.removeMovieClip();
Symbol 803 MovieClip Frame 2
stop();
Symbol 803 MovieClip Frame 9
if (_global.rootFrame != undefined) {
_global.menuFunc();
delete _global.menuFunc;
var f = _global.rootFrame;
delete _global.rootFrame;
_root.gotoAndStop(f);
} else {
var func = _global.menuFunc;
delete _global.menuFunc;
func();
_parent.gotoAndStop(_global.menuFrame);
}
Instance of Symbol 802 MovieClip in Symbol 803 MovieClip Frame 9
/* no clip actions */
Symbol 814 Button
on (release) {
optionsButtonFunc();
}
on (rollOver) {
KBF.setMouseFocus("optionsButton");
}
Symbol 816 Button
on (release) {
backButtonFunc();
}
on (rollOver) {
KBF.setMouseFocus("backButton");
}
Symbol 818 Button
on (release) {
mainMenuButtonFunc();
}
on (rollOver) {
KBF.setMouseFocus("mainMenuButton");
}
Symbol 820 Button
on (release) {
restartButtonFunc();
}
on (rollOver) {
KBF.setMouseFocus("restartButton");
}
Symbol 823 Button
on (release) {
trainingButtonFunc();
}
on (rollOver) {
KBF.setMouseFocus("trainingButton");
}
Symbol 826 Button
on (release) {
objectivesButtonFunc();
}
on (rollOver) {
KBF.setMouseFocus("objectivesButton");
}
Symbol 829 Button
on (release) {
hintsButtonFunc();
}
on (rollOver) {
KBF.setMouseFocus("hintsButton");
}
Symbol 835 Button
on (release) {
backButtonFunc();
}
on (rollOver) {
KBF.setMouseFocus("backButton");
}
Symbol 840 Button
on (release) {
if (!_global.SGM) {
_root.Game.switchTiles();
_global.SGM = true;
refreshOptions();
}
}
Symbol 843 Button
on (release) {
if (_global.SGM) {
_root.Game.switchTiles();
_global.SGM = false;
refreshOptions();
}
}
Symbol 844 Button
on (release) {
_global.autoSGM = true;
refreshOptions();
}
Symbol 845 Button
on (release) {
_global.autoSGM = false;
refreshOptions();
}
Symbol 850 Button
on (release) {
_global.SFX = true;
var S = new Sound();
S.setVolume(100);
refreshOptions();
}
Symbol 851 Button
on (release) {
_global.SFX = false;
var S = new Sound();
S.setVolume(0);
refreshOptions();
}
Symbol 855 Button
on (release) {
_global.particles = true;
refreshOptions();
}
Symbol 856 Button
on (release) {
_global.particles = false;
refreshOptions();
}
Symbol 857 Button
on (release) {
SGMONFunc();
}
on (rollOver) {
KBF.setMouseFocus("SGMON");
}
Symbol 858 Button
on (release) {
SGMOFFFunc();
}
on (rollOver) {
KBF.setMouseFocus("SGMOFF");
}
Symbol 859 Button
on (release) {
AUTOSGMONFunc();
}
on (rollOver) {
KBF.setMouseFocus("AUTOSGMON");
}
Symbol 860 Button
on (release) {
AUTOSGMOFFFunc();
}
on (rollOver) {
KBF.setMouseFocus("AUTOSGMOFF");
}
Symbol 861 Button
on (release) {
SFXONFunc();
}
on (rollOver) {
KBF.setMouseFocus("SFXON");
}
Symbol 862 Button
on (release) {
SFXOFFFunc();
}
on (rollOver) {
KBF.setMouseFocus("SFXOFF");
}
Symbol 863 Button
on (release) {
PARTONFunc();
}
on (rollOver) {
KBF.setMouseFocus("PARTON");
}
Symbol 864 Button
on (release) {
PARTOFFFunc();
}
on (rollOver) {
KBF.setMouseFocus("PARTOFF");
}
Symbol 866 Button
on (release) {
FPSONFunc();
}
on (rollOver) {
KBF.setMouseFocus("FPSON");
}
Symbol 867 Button
on (release) {
FPSOFFFunc();
}
on (rollOver) {
KBF.setMouseFocus("FPSOFF");
}
Symbol 889 MovieClip Frame 1
stop();
Instance of Symbol 198 MovieClip "trigIndic" in Symbol 930 MovieClip Frame 4
onClipEvent (load) {
gotoAndStop (2);
}
Symbol 930 MovieClip Frame 5
qmark.gotoAndStop("qmark");
Instance of Symbol 919 MovieClip in Symbol 930 MovieClip Frame 7
onClipEvent (load) {
label = "Z";
}
Instance of Symbol 919 MovieClip in Symbol 930 MovieClip Frame 7
onClipEvent (load) {
label = "X";
}
Symbol 934 Button
on (release) {
nextButtonFunc();
}
on (rollOver) {
KBF.setMouseFocus("nextButton");
}
Symbol 938 Button
on (release) {
prevButtonFunc();
}
on (rollOver) {
KBF.setMouseFocus("prevButton");
}
Symbol 955 MovieClip Frame 1
var i = 0;
do {
if (_root.Game.scriptController.VARIABLES["objectives" + (i + 1)] == undefined) {
break;
}
this["obj" + i]._y = 190 + (i * 40);
this["obj" + i].text = _root.Game.scriptController.VARIABLES["objectives" + (i + 1)];
i++;
} while (i != 3);
exit._y = 190 + (i * 40);
Symbol 955 MovieClip Frame 2
var i = 0;
do {
if (_root.Game.scriptController.VARIABLES["objectives" + (i + 1)] == undefined) {
break;
}
this["obj" + i]._y = 230 + (i * 40);
this["obj" + i].text = _root.Game.scriptController.VARIABLES["objectives" + (i + 1)];
i++;
} while (i != 3);
exit._y = 230 + (i * 40);
Symbol 955 MovieClip Frame 3
var i = 0;
do {
if (_root.Game.scriptController.VARIABLES["objectives" + (i + 1)] == undefined) {
break;
}
this["obj" + i]._y = 230 + (i * 40);
this["obj" + i].text = _root.Game.scriptController.VARIABLES["objectives" + (i + 1)];
i++;
} while (i != 3);
exit._y = 230 + (i * 40);
Symbol 955 MovieClip Frame 4
var i = 0;
do {
if (_root.Game.scriptController.VARIABLES["objectives" + (i + 1)] == undefined) {
break;
}
this["obj" + i]._y = 230 + (i * 40);
this["obj" + i].text = _root.Game.scriptController.VARIABLES["objectives" + (i + 1)];
i++;
} while (i != 3);
exit._y = 230 + (i * 40);
Symbol 955 MovieClip Frame 5
var i = 0;
do {
if (_root.Game.scriptController.VARIABLES["objectives" + (i + 1)] == undefined) {
break;
}
this["obj" + i]._y = 230 + (i * 40);
this["obj" + i].text = _root.Game.scriptController.VARIABLES["objectives" + (i + 1)];
i++;
} while (i != 3);
exit._y = 230 + (i * 40);
Symbol 955 MovieClip Frame 6
var i = 0;
do {
if (_root.Game.scriptController.VARIABLES["objectives" + (i + 1)] == undefined) {
break;
}
this["obj" + i]._y = 190 + (i * 40);
this["obj" + i].text = _root.Game.scriptController.VARIABLES["objectives" + (i + 1)];
i++;
} while (i != 3);
exit._y = 190 + (i * 40);
Symbol 963 Button
on (release) {
continueButtonFunc();
}
on (rollOver) {
KBF.setMouseFocus("continueButton");
}
Symbol 967 MovieClip [igMenu] Frame 1
function transfer(frame, func) {
_global.menuFrame = frame;
_global.menuFunc = func;
wiper.gotoAndPlay("hide");
}
function restartButtonFunc() {
transfer("blank", function () {
_root.Game.cleanup();
_root.gotoAndStop("bouncer");
_root.igMenu.removeMovieClip();
});
}
function objectivesButtonFunc() {
transfer(4);
}
function hintsButtonFunc() {
transfer(6);
}
function trainingButtonFunc() {
transfer(3);
}
function optionsButtonFunc() {
transfer(2);
}
function mainMenuButtonFunc() {
transfer("blank", function () {
_root.Game.cleanup();
delete _global.rootFrame;
delete _global.menuFunc;
_global.menuFrame = "main";
_root.gotoAndStop("menu");
_root.igMenu.removeMovieClip();
});
}
function backButtonFunc() {
transfer("blank", function () {
_root.Game.fpsControl.lastFPS = 20;
_root.Game.paused = false;
_root.onEnterFrame = function () {
_root.Game.run();
};
if (_root.Game.PLAYER.mc.stoppable) {
_root.Game.PLAYER.mc.play();
}
for (var _local3 in _root.Game.NMELIST) {
var _local3 = _root.Game.NMELIST[_local3].mc;
if (_local3.stoppable) {
_local3.play();
}
}
_root.popup2._visible = true;
_quality = "LOW";
_root.menuButton._visible = true;
_root.Game.fpsControl.lastFPS = 20;
_root.bg.filters = [];
delete _global.menuFunc;
_root.igMenu.removeMovieClip();
});
}
stop();
Instance of Symbol 831 MovieClip "KBF" in Symbol 967 MovieClip [igMenu] Frame 1
onClipEvent (load) {
focusList = new Array(["restartButton", 6, "", 1, ""], ["objectivesButton", 0, "", 2, ""], ["hintsButton", 1, "", 3, ""], ["trainingButton", 2, "", 4, ""], ["optionsButton", 3, "", 5, ""], ["mainMenuButton", 4, "", 6, ""], ["backButton", 5, "", 0, ""]);
currentFocus = _global.mainFocus;
currentMC = _parent[focusList[currentFocus][0]];
changeFocus = function (dir) {
var _local3 = focusList[currentFocus][dir];
if (_local3 != "") {
currentMC._alpha = 100;
var _local2 = new Sound(currentMC);
_local2.attachSound("UIbuttonHover");
_local2.start();
currentFocus = _local3;
currentMC = _parent[focusList[currentFocus][0]];
}
};
setMouseFocus = function (clipName) {
if (timer > 5) {
currentMC._alpha = 100;
currentMC.gotoAndStop(1);
currentMC = _parent[clipName];
var _local2 = 0;
while (_local2 < focusList.length) {
if (focusList[_local2][0] == clipName) {
currentFocus = _local2;
break;
}
_local2++;
}
}
};
timer = 0;
}
onClipEvent (enterFrame) {
currentMC._alpha = 60 + (Math.sin(timer / 2) * 20);
timer++;
}
on (keyPress "<Up>") {
changeFocus(1);
}
on (keyPress "<Right>") {
changeFocus(2);
}
on (keyPress "<Down>") {
changeFocus(3);
}
on (keyPress "<Left>") {
changeFocus(4);
}
on (keyPress "<Space>") {
var s = new Sound(currentMC);
s.attachSound("UIbuttonPress");
s.start();
_global.mainFocus = currentFocus;
_parent[currentMC._name + "Func"]();
}
Symbol 967 MovieClip [igMenu] Frame 2
function refreshOptions() {
if (_global.FPS) {
FPSindic._x = FPSON._x;
FPSindic._y = FPSON._y;
} else {
FPSindic._x = FPSOFF._x;
FPSindic._y = FPSOFF._y;
}
if (_global.SGM) {
SGMindic._x = SGMON._x;
SGMindic._y = SGMON._y;
} else {
SGMindic._x = SGMOFF._x;
SGMindic._y = SGMOFF._y;
}
if (_global.autoSGM) {
autoSGMindic._x = AUTOSGMON._x;
autoSGMindic._y = AUTOSGMON._y;
} else {
autoSGMindic._x = AUTOSGMOFF._x;
autoSGMindic._y = AUTOSGMOFF._y;
}
if (_global.music) {
musicindic._x = musicON._x;
musicindic._y = musicON._y;
} else {
musicindic._x = musicOFF._x;
musicindic._y = musicOFF._y;
}
if (_global.SFX) {
SFXindic._x = SFXON._x;
SFXindic._y = SFXON._y;
} else {
SFXindic._x = SFXOFF._x;
SFXindic._y = SFXOFF._y;
}
if (_global.particles) {
PARTindic._x = PARTON._x;
PARTindic._y = PARTON._y;
} else {
PARTindic._x = PARTOFF._x;
PARTindic._y = PARTOFF._y;
}
}
function backButtonFunc() {
transfer(1);
}
function SFXONFunc() {
_global.SFX = true;
var _local2 = new Sound();
_local2.setVolume(100);
refreshOptions();
}
function SFXOFFFunc() {
_global.SFX = false;
var _local2 = new Sound();
_local2.setVolume(0);
refreshOptions();
}
function PARTONFunc() {
_global.particles = true;
refreshOptions();
}
function PARTOFFFunc() {
_global.particles = false;
refreshOptions();
}
function AUTOSGMONFunc() {
_global.autoSGM = true;
refreshOptions();
}
function AUTOSGMOFFFunc() {
_global.autoSGM = false;
refreshOptions();
}
function SGMONFunc() {
if (!_global.SGM) {
_root.Game.switchTiles();
_global.SGM = true;
refreshOptions();
}
}
function SGMOFFFunc() {
if (_global.SGM) {
_root.Game.switchTiles();
_global.SGM = false;
refreshOptions();
}
}
function FPSONFunc() {
if (!_global.FPS) {
_root.f.gotoAndStop(1);
_root.f._visible = true;
_root.Game.fpsControl.run();
_global.FPS = true;
refreshOptions();
}
}
function FPSOFFFunc() {
if (_global.FPS) {
_root.f.gotoAndStop(2);
_root.f._visible = false;
_global.FPS = false;
refreshOptions();
}
}
refreshOptions();
Instance of Symbol 831 MovieClip "KBF" in Symbol 967 MovieClip [igMenu] Frame 2
onClipEvent (load) {
focusList = new Array(["backButton", 1, 1, "", ""], ["SFXON", 3, 2, 0, ""], ["SFXOFF", 4, "", 0, 1], ["PARTON", 5, 4, 1, ""], ["PARTOFF", 6, "", 2, 3], ["AUTOSGMON", 7, 6, 3, ""], ["AUTOSGMOFF", 8, "", 4, 5], ["SGMON", 9, 8, 5, ""], ["SGMOFF", 10, "", 6, 7], ["FPSON", "", 10, 7, ""], ["FPSOFF", "", "", 8, 9]);
currentFocus = 0;
currentMC = _parent[focusList[currentFocus][0]];
changeFocus = function (dir) {
var _local3 = focusList[currentFocus][dir];
if (_local3 != "") {
currentMC._alpha = 100;
var _local2 = new Sound(currentMC);
_local2.attachSound("UIbuttonHover");
_local2.start();
currentFocus = _local3;
currentMC = _parent[focusList[currentFocus][0]];
}
};
setMouseFocus = function (clipName) {
currentMC._alpha = 100;
currentMC.gotoAndStop(1);
currentMC = _parent[clipName];
var _local2 = 0;
while (_local2 < focusList.length) {
if (focusList[_local2][0] == clipName) {
currentFocus = _local2;
break;
}
_local2++;
}
};
timer = 0;
}
onClipEvent (enterFrame) {
currentMC._alpha = 60 + (Math.sin(timer / 2) * 20);
timer++;
}
on (keyPress "<Up>") {
changeFocus(1);
}
on (keyPress "<Right>") {
changeFocus(2);
}
on (keyPress "<Down>") {
changeFocus(3);
}
on (keyPress "<Left>") {
changeFocus(4);
}
on (keyPress "<Space>") {
var s = new Sound(currentMC);
s.attachSound("UIbuttonPress");
s.start();
_parent[currentMC._name + "Func"]();
}
Symbol 967 MovieClip [igMenu] Frame 3
function nextButtonFunc() {
if (instructions._currentframe < instructions._totalframes) {
instructions.nextFrame();
prevButton.enabled = true;
prevButton._alpha = 100;
if (instructions._currentframe == instructions._totalframes) {
nextButton._alpha = 40;
nextButton.enabled = false;
}
}
}
function prevButtonFunc() {
if (instructions._currentframe > 1) {
instructions.prevFrame();
nextButton.enabled = true;
nextButton._alpha = 100;
if (instructions._currentframe == 1) {
prevButton._alpha = 40;
prevButton.enabled = false;
}
}
}
function backButtonFunc() {
transfer(1);
}
instructions.gotoAndStop(1);
prevButton.enabled = false;
prevButton._alpha = 40;
nextButton.enabled = true;
nextButton._alpha = 100;
Instance of Symbol 831 MovieClip "KBF" in Symbol 967 MovieClip [igMenu] Frame 3
onClipEvent (load) {
focusList = new Array(["backButton", 2, 2, "", 1], ["prevButton", "", 2, 0, ""], ["nextButton", "", "", 0, 1]);
currentFocus = 0;
currentMC = _parent[focusList[currentFocus][0]];
changeFocus = function (dir) {
var _local3 = focusList[currentFocus][dir];
if (_local3 != "") {
currentMC._alpha = 100;
var _local2 = new Sound(currentMC);
_local2.attachSound("UIbuttonHover");
_local2.start();
currentFocus = _local3;
currentMC = _parent[focusList[currentFocus][0]];
}
};
setMouseFocus = function (clipName) {
currentMC._alpha = 100;
currentMC.gotoAndStop(1);
currentMC = _parent[clipName];
var _local2 = 0;
while (_local2 < focusList.length) {
if (focusList[_local2][0] == clipName) {
currentFocus = _local2;
break;
}
_local2++;
}
};
timer = 0;
}
onClipEvent (enterFrame) {
currentMC._alpha = 60 + (Math.sin(timer / 2) * 20);
timer++;
}
on (keyPress "<Up>") {
changeFocus(1);
}
on (keyPress "<Right>") {
changeFocus(2);
}
on (keyPress "<Down>") {
changeFocus(3);
}
on (keyPress "<Left>") {
changeFocus(4);
}
on (keyPress "<Space>") {
var s = new Sound(currentMC);
s.attachSound("UIbuttonPress");
s.start();
_parent[currentMC._name + "Func"]();
}
Symbol 967 MovieClip [igMenu] Frame 4
function backButtonFunc() {
transfer(1);
}
objs.gotoAndStop(_root.Game.missionType + 1);
Instance of Symbol 831 MovieClip "KBF" in Symbol 967 MovieClip [igMenu] Frame 4
onClipEvent (load) {
focusList = new Array(["backButton", "", "", "", ""]);
currentFocus = 0;
currentMC = _parent[focusList[currentFocus][0]];
changeFocus = function (dir) {
var _local3 = focusList[currentFocus][dir];
if (_local3 != "") {
currentMC._alpha = 100;
var _local2 = new Sound(currentMC);
_local2.attachSound("UIbuttonHover");
_local2.start();
currentFocus = _local3;
currentMC = _parent[focusList[currentFocus][0]];
}
};
setMouseFocus = function (clipName) {
currentMC._alpha = 100;
currentMC.gotoAndStop(1);
currentMC = _parent[clipName];
var _local2 = 0;
while (_local2 < focusList.length) {
if (focusList[_local2][0] == clipName) {
currentFocus = _local2;
break;
}
_local2++;
}
};
timer = 0;
}
onClipEvent (enterFrame) {
currentMC._alpha = 60 + (Math.sin(timer / 2) * 20);
timer++;
}
on (keyPress "<Up>") {
changeFocus(1);
}
on (keyPress "<Right>") {
changeFocus(2);
}
on (keyPress "<Down>") {
changeFocus(3);
}
on (keyPress "<Left>") {
changeFocus(4);
}
on (keyPress "<Space>") {
var s = new Sound(currentMC);
s.attachSound("UIbuttonPress");
s.start();
_parent[currentMC._name + "Func"]();
}
Symbol 967 MovieClip [igMenu] Frame 5
function continueButtonFunc() {
transfer("blank", function () {
_root.Game.paused = false;
_root.pausedIndic.removeMovieClip();
_root.onEnterFrame = function () {
_root.Game.run();
};
_root.menuButton._visible = true;
_root.bg.filters = [];
_root.igMenu.removeMovieClip();
});
}
objs.gotoAndStop(_root.Game.missionType + 1);
Instance of Symbol 831 MovieClip "KBF" in Symbol 967 MovieClip [igMenu] Frame 5
onClipEvent (load) {
focusList = new Array(["continueButton", "", "", "", ""]);
currentFocus = 0;
currentMC = _parent[focusList[currentFocus][0]];
changeFocus = function (dir) {
var _local3 = focusList[currentFocus][dir];
if (_local3 != "") {
currentMC._alpha = 100;
var _local2 = new Sound(currentMC);
_local2.attachSound("UIbuttonHover");
_local2.start();
currentFocus = _local3;
currentMC = _parent[focusList[currentFocus][0]];
}
};
setMouseFocus = function (clipName) {
currentMC._alpha = 100;
currentMC.gotoAndStop(1);
currentMC = _parent[clipName];
var _local2 = 0;
while (_local2 < focusList.length) {
if (focusList[_local2][0] == clipName) {
currentFocus = _local2;
break;
}
_local2++;
}
};
timer = 0;
}
onClipEvent (enterFrame) {
currentMC._alpha = 60 + (Math.sin(timer / 2) * 20);
timer++;
}
on (keyPress "<Up>") {
changeFocus(1);
}
on (keyPress "<Right>") {
changeFocus(2);
}
on (keyPress "<Down>") {
changeFocus(3);
}
on (keyPress "<Left>") {
changeFocus(4);
}
on (keyPress "<Space>") {
var s = new Sound(currentMC);
s.attachSound("UIbuttonPress");
s.start();
_parent[currentMC._name + "Func"]();
}
Symbol 967 MovieClip [igMenu] Frame 6
function backButtonFunc() {
transfer(1);
}
var h = _root.Game.scriptController.VARIABLES.hint;
if (h != undefined) {
hint = h;
} else {
hint = "No hints available for this mission";
}
Instance of Symbol 831 MovieClip "KBF" in Symbol 967 MovieClip [igMenu] Frame 6
onClipEvent (load) {
focusList = new Array(["backButton", "", "", "", ""]);
currentFocus = 0;
currentMC = _parent[focusList[currentFocus][0]];
changeFocus = function (dir) {
var _local3 = focusList[currentFocus][dir];
if (_local3 != "") {
currentMC._alpha = 100;
var _local2 = new Sound(currentMC);
_local2.attachSound("UIbuttonHover");
_local2.start();
currentFocus = _local3;
currentMC = _parent[focusList[currentFocus][0]];
}
};
setMouseFocus = function (clipName) {
currentMC._alpha = 100;
currentMC.gotoAndStop(1);
currentMC = _parent[clipName];
var _local2 = 0;
while (_local2 < focusList.length) {
if (focusList[_local2][0] == clipName) {
currentFocus = _local2;
break;
}
_local2++;
}
};
timer = 0;
}
onClipEvent (enterFrame) {
currentMC._alpha = 60 + (Math.sin(timer / 2) * 20);
timer++;
}
on (keyPress "<Up>") {
changeFocus(1);
}
on (keyPress "<Right>") {
changeFocus(2);
}
on (keyPress "<Down>") {
changeFocus(3);
}
on (keyPress "<Left>") {
changeFocus(4);
}
on (keyPress "<Space>") {
var s = new Sound(currentMC);
s.attachSound("UIbuttonPress");
s.start();
_parent[currentMC._name + "Func"]();
}
Symbol 1094 MovieClip [tile2] Frame 1
stop();
Symbol 1107 Button
on (keyPress "<Space>") {
_root.Game.scriptController.deletePopup(scriptCaller);
}
Symbol 1117 MovieClip [popup] Frame 1
stop();
Instance of Symbol 1108 MovieClip in Symbol 1117 MovieClip [popup] Frame 1
onClipEvent (enterFrame) {
_parent.lifetime--;
if (_parent.lifetime == 0) {
_root.Game.scriptController.deletePopup(_parent.scriptCaller);
}
}
Symbol 1123 MovieClip [fpsContainer] Frame 1
stop();
Symbol 1164 MovieClip [__Packages.MapController] Frame 0
class MapController
{
var TILES, table, paused, particleChunks, tileParticleChunks, particleSounds, soundController, particleController, fpsControl, scriptController, gameTime, keyListen, xSize, ySize, exitX, exitY, timeLimit, MAPINFO, TRIGGERS, minimapControl, PLAYER, totalEnemies, OBJECTS, BREAKWALLS, Timer, timeLimit2, Timer2, exitMarker, loseType, HITINFO, FLOORINFO, WALLINFO, VISIONINFO, HEIGHTINFO, TRIGINFO, FOOTSTEPINFO;
function MapController (levelNum) {
TILES = new Array();
table = new Array();
paused = true;
_root.attachMovie("igMenu", "igMenu", 55);
_root.menuButton._visible = false;
particleChunks = new Array([3], [4, "barrelParticle1", "barrelParticle2", "barrelParticle3"], [5, "crateParticle1", "crateParticle2", "crateParticle3"], [4, "expBarrel1", "expBarrel2", "expBarrel3"], [2, "chairObj1", "chairObj2", "chairObj3"], [2, "chairObj1", "chairObj2", "chairObj3"], [2, "chairObj1", "chairObj2", "chairObj3"], [2, "chairObj1", "chairObj2", "chairObj3"], [2, "chairObj1", "chairObj2", "chairObj3"], [2, "chairObj1", "chairObj2", "chairObj3"]);
tileParticleChunks = new Array([2, "particle", "particle", "particle"], [5, "crateParticle1", "crateParticle2", "crateParticle3"], [1, "stone1", "stone2", "stone3"], [5, "palette1", "palette2"], [5, "deskChunk1", "deskChunk2", "deskChunk3", "deskChunk4", "deskChunk5"]);
particleSounds = new Array(["bodyPart1", "bodyPart2", "bodyPart3", "bodyPart4"], ["wallChunk2", "wallChunk2", "wallChunk1"], ["smallShrapnel1", "smallShrapnel2", "smallShrapnel3"], [], ["barrelChunk1", "barrelChunk2", "barrelChunk3"], ["crateChunk1", "crateChunk2", "crateChunk3"], ["can1", "can2", "can3"]);
soundController = new SoundController(this);
stopAllSounds();
soundController.playMusic("bgMusic" + (random(3) + 1));
particleController = new ParticleController(this);
fpsControl = new FPSController(this);
scriptController = new ScriptController(this);
gameTime = 0;
keyListen = new Object();
keyListen.onKeyDown = function () {
_root.Game.PLAYER.keyPress(Key.getCode());
};
keyListen.onKeyUp = function () {
_root.Game.PLAYER.keyUp(Key.getCode());
};
Key.addListener(keyListen);
var _local34 = _global.levels[levelNum];
var _local28 = _local34.split("~$~");
var _local21 = _local28[5].split("#");
xSize = Number(_local21[0].split("x")[0]);
ySize = Number(_local21[0].split("x")[1]);
exitX = Number(_local21[2].split("x")[0]) + 3;
exitY = Number(_local21[2].split("x")[1]) + 3;
timeLimit = Number(_local21[5]);
var _local33 = Number(_local21[4]);
missionType = _local33;
_global.menuFrame = 5;
_root.igMenu.setMask(_root.igMenu.wiper);
delete _global.menuFunc;
_root.igMenu.wiper.gotoAndPlay("reveal");
if (_global.FPS) {
_root.f.gotoAndStop(1);
_root.f._visible = true;
_root.f.fps1.gotoAndStop(1);
_root.f.fps2.gotoAndStop(1);
} else {
_root.f.gotoAndStop(2);
_root.f._visible = false;
}
MAPINFO = new Array(ySize);
var _local11 = 0;
while (_local11 < ySize) {
MAPINFO[_local11] = new Array();
_local11++;
}
var _local6 = 0;
var _local29 = _local28[6].split("^");
var _local12;
var _local31 = _local29.length;
_local11 = 0;
while (_local11 < _local31) {
_local12 = _local29[_local11].split("*");
var _local14 = _local12[1];
if (_local14 != undefined) {
var _local8 = 0;
while (_local8 < _local14) {
MAPINFO[Math.floor(_local6 / xSize)][_local6 % xSize] = Number(_local12[0]);
_local6++;
_local8++;
}
} else {
MAPINFO[Math.floor(_local6 / xSize)][_local6 % xSize] = Number(_local12[0]);
_local6++;
}
_local11++;
}
TRIGGERS = new Array();
var _local18 = _local28[3].split("#");
_local11 = 0;
while (_local11 < _local18.length) {
if (_local18[_local11] != "") {
var _local10 = _local18[_local11].split("|");
TRIGGERS.push([Number(_local10[0]), Number(_local10[1]), Number(_local10[2]), Number(_local10[3])]);
}
_local11++;
}
padMap();
buildInfoArrays();
buildMap();
minimapControl = new MiniMapController(this);
PLAYER = new PlayerController(this, Number(_local21[1].split("x")[0]) + 3, Number(_local21[1].split("x")[1]) + 3, Number(_local21[3]));
scriptController.VARIABLES.PLAYERX = PLAYER.mc.x;
scriptController.VARIABLES.PLAYERY = PLAYER.mc.y;
mapx = PLAYER.mc.x - 3;
mapy = PLAYER.mc.y - 3;
var _local16 = _local28[0].split("#");
var _local13;
totalEnemies = _local16.length;
scriptController.VARIABLES.NMECOUNT = totalEnemies;
_local11 = 0;
while (_local11 < _local16.length) {
if (_local16[_local11] != "") {
_local13 = _local16[_local11].split("|");
NMELIST.push(new EnemyController(this, Number(_local13[0]) + 3, Number(_local13[1]) + 3, Number(_local13[2]), _local13[3]));
minimapControl.addEnemy(NMELIST[NMELIST.length - 1].mc);
}
_local11++;
}
OBJECTS = new Array();
var _local30 = new Array("objBarrel", "objCrate", "objFlammableBarrel", "objChair1", "objChair2", "objChair3", "objChair4", "objChair5", "objChair6");
var _local4;
var _local19 = _local28[1].split("#");
_local11 = 0;
while (_local11 < _local19.length) {
if (_local19[_local11] != "") {
_local4 = _local19[_local11].split("|");
OBJECTS.push(addScrollable(_root.bg.attachMovie(_local30[Number(_local4[2]) - 1], "obj" + objCount(), makeDepth(Number(_local4[0]), Number(_local4[1])) + 2, {objIndex:OBJECTS.length, x:Number(_local4[0]) + 3, y:Number(_local4[1]) + 3, z:0, depthbonus:2, objType:Number(_local4[2])})));
var _local5 = OBJECTS[OBJECTS.length - 1];
if (Number(_local4[3]) == 1) {
_local5.pushable = true;
} else {
_local5.pushable = false;
}
if (Number(_local4[4]) == 1) {
_local5.destructable = true;
} else {
_local5.destructable = false;
}
if (Number(_local4[5]) == 1) {
_local5.breakable = true;
} else {
_local5.breakable = false;
}
table[getPFI(_local5.x, _local5.y)] = 1;
}
_local11++;
}
var _local37;
var _local15 = _local28[2].split("#");
_local11 = 0;
while (_local11 < _local15.length) {
if ((_local15[_local11] != "") && (_local15[_local11] != "-1")) {
scriptController.addScript(_local15[_local11]);
}
_local11++;
}
BREAKWALLS = new Array();
var _local9;
var _local17 = _local28[4].split("#");
_local11 = 0;
while (_local11 < _local17.length) {
if (_local17[_local11] != "") {
_local9 = _local17[_local11].split("|");
var _local7 = Number(_local9[2]);
var _local20 = MAPINFO[Number(_local9[1]) + 3][Number(_local9[0]) + 3];
BREAKWALLS.push([Number(_local9[0]) + 3, Number(_local9[1]) + 3, _local7, tileIsFloor(_local7), tileBlockable(_local7), tileIsWall(_local7), tileIsTall(_local7), tileHeight(_local7), tileExplosionType(_local20)]);
}
_local11++;
}
if (((missionType == 0) || (missionType == 3)) || (missionType == 2)) {
placeFinish(false);
}
if (timeLimit > 0) {
Timer = _root.attachMovie("Timer", "Timer", 200, {_x:580, _y:270});
timeLimit++;
Timer.m1.gotoAndStop(1);
Timer.m2.gotoAndStop(1);
Timer.s1.gotoAndStop(1);
Timer.s2.gotoAndStop(1);
secondCounter = 22;
updateTimer();
}
if (_global.SGM) {
switchTiles();
}
if (_local21[6] != "") {
scriptController.executeScript(Number(_local21[6]));
scriptController.run();
}
minimapControl.run();
var _local32 = new flash.filters.BlurFilter();
_local32.quality = 3;
_local32.blurX = random(5) + 5;
_local32.blurY = random(5) + 5;
_root.bg.filters = [_local32];
}
function run() {
if (resetShake > 1) {
bgxAdd = random(11) - 5;
bgyAdd = random(11) - 5;
resetShake--;
if (resetShake == 1) {
resetShake = 0;
bgxAdd = 0;
bgyAdd = 0;
}
}
scriptController.run();
var _local18;
_root.miniMap.bg.gotoAndStop(1);
if ((gameTime % 2) == 0) {
doChains();
}
particleController.run();
PLAYER.run();
for (_local18 in NMELIST) {
NMELIST[_local18].run();
}
var _local13 = (-mapx) % 1;
var _local12 = (-mapy) % 1;
var _local11 = Math.ceil(-mapx);
var _local10 = Math.ceil(-mapy);
_root.bg._x = ((_local13 - _local12) * 40) + bgxAdd;
_root.bg._y = ((_local13 + _local12) * 20) + bgyAdd;
if ((_local11 != oldmapx) || (_local10 != oldmapy)) {
oldmapx = _local11;
oldmapy = _local10;
updateTiles();
}
var _local4;
_local13 = _local11;
_local12 = _local10;
_local11 = 0;
_local10 = 0;
var _local17 = 0;
var _local16 = 0;
var _local5;
var _local7;
var _local6;
var _local9;
var _local8;
var _local14 = SCROLLABLES;
var _local15 = _root.bg;
for (_local4 in _local14) {
_local4 = _local14[_local4];
_local7 = _local4.x + 6;
_local6 = _local4.y + 6;
_local11 = _local13 + Math.floor(_local7);
_local10 = _local12 + Math.floor(_local6);
_local17 = _local13 + Math.round(_local7);
_local16 = _local12 + Math.round(_local6);
_local5 = _local15[(("t" + _local10) + "_") + _local11];
if (_local5 != undefined) {
_local9 = _local6 % 1;
_local8 = _local7 % 1;
_local4._x = _local5._x + ((_local8 - _local9) * 40);
_local4._y = (_local5._y + ((_local8 + _local9) * 20)) - (_local4.z * 10);
_local4.swapDepths((_local15[(("t" + _local16) + "_") + _local17].oD + 2) + _local4.depthbonus);
_local4._visible = true;
} else {
_local4._visible = false;
}
}
minimapControl.run();
if (_global.FPS) {
fpsControl.run();
}
updateTimer();
gameTime++;
}
function updateTimer() {
if (timeLimit > 0) {
secondCounter++;
if (secondCounter == 23) {
secondCounter = 0;
timeLimit--;
var _local2 = timeLimit % 60;
var _local3 = Math.floor(timeLimit / 60);
Timer.m1.gotoAndStop((_local3 % 10) + 1);
Timer.m2.gotoAndStop(Math.floor(_local3 / 10) + 1);
Timer.s1.gotoAndStop((_local2 % 10) + 1);
Timer.s2.gotoAndStop(Math.floor(_local2 / 10) + 1);
if (timeLimit == 0) {
loseMission();
return(undefined);
}
}
}
if (timeLimit2 != undefined) {
secondCounter2++;
if (secondCounter2 == 23) {
secondCounter2 = 0;
timeLimit2--;
scriptController.VARIABLES.TIMER = timeLimit2;
var _local2 = timeLimit2 % 60;
var _local3 = Math.floor(timeLimit2 / 60);
Timer2.m1.gotoAndStop((_local3 % 10) + 1);
Timer2.m2.gotoAndStop(Math.floor(_local3 / 10) + 1);
Timer2.s1.gotoAndStop((_local2 % 10) + 1);
Timer2.s2.gotoAndStop(Math.floor(_local2 / 10) + 1);
if (timeLimit2 == -1) {
scriptController.executeScript(Timer2.scriptNum);
delete scriptController.VARIABLES.TIMER;
scriptController.VARIABLES.HASTIMER = 0;
delete timeLimit2;
Timer2.removeMovieClip();
return(undefined);
}
}
}
}
function placeFinish(sound) {
exitMarker = _root.bg.attachMovie("exitMarker", "exitMarker", makeDepth(exitX, exitY) + 2, {x:exitX, y:exitY, z:0, ref:this, depthbonus:2});
addScrollable(exitMarker);
if (!PLAYER.inMotion) {
if (PLAYER.onWall) {
checkPosition(PLAYER.oldWallX, PLAYER.oldWallY);
} else {
checkPosition(Math.round(PLAYER.mc.x), Math.round(PLAYER.mc.y));
}
}
minimapControl.addExitBlip(exitX, exitY);
if (sound) {
if (_global.SFX) {
}
}
}
function makeNoise(x, y, volume, delay) {
var _local11 = Math.round(x);
var _local10 = Math.round(y);
var _local12;
var _local2;
for (_local2 in NMELIST) {
_local2 = NMELIST[_local2];
var _local7 = _local2.explodeDelay;
if (!delay) {
_local7 = _local7 - 15;
}
if (_local7 <= 0) {
var _local9 = Math.abs(x - _local2.mc.x);
var _local8 = Math.abs(y - _local2.mc.y);
_local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 < volume) {
var _local3 = false;
var _local4 = false;
var _local5 = true;
if (volume > 6) {
_local3 = true;
_local4 = true;
_local5 = true;
}
if (_local2.lured) {
_local4 = true;
_local3 = true;
_local5 = false;
}
var _local6;
if ((_local2.px == _local11) && (_local2.py == _local10)) {
if (_local2.SPEED != _local2.HISPEED) {
_local6 = _local2.pathfindTo(_local11, _local10, true, false, true, false);
}
} else {
_local6 = _local2.pathfindTo(_local11, _local10, _local4, false, _local3, _local5);
}
if (!_local6) {
}
}
}
}
}
function checkPosition(x, y) {
if (exitMarker != undefined) {
if (x == exitX) {
if (y == exitY) {
winMission();
}
}
}
}
function killEnemy() {
killedEnemies++;
scriptController.VARIABLES.NMECOUNT = totalEnemies - killedEnemies;
if ((missionType == 1) || (missionType == 4)) {
if (killedEnemies == totalEnemies) {
placeFinish(true);
}
}
}
function loseMission() {
_root.popup2.removeMovieClip();
_root.menuButton._visible = false;
PLAYER.mc.paused = true;
paused = true;
Key.removeListener(keyListen);
if (!PLAYER.onWall) {
mapx = PLAYER.mc.x - 3;
mapy = PLAYER.mc.y - 3;
} else {
mapx = PLAYER.oldWallX - 3;
mapy = PLAYER.oldWallY - 3;
}
if (loseType == "explode") {
PLAYER.mc.removeMovieClip();
_root.fadeCounter = -65;
} else if (loseType == "caught") {
_root.fadeCounter = -40;
} else if (loseType == "neckBreak") {
_root.fadeCounter = -20;
} else {
_root.fadeCounter = 0;
}
updateTiles();
PLAYER.mc.trigIndic.gotoAndStop(1);
_root.onEnterFrame = function () {
if (_root.fadeCounter < 0) {
if ((_root.Game.loseType == "explode") || (_root.Game.loseType == "neckBreak")) {
if (_root.Game.resetShake > 1) {
_root.Game.bgxAdd = random(11) - 5;
_root.Game.bgyAdd = random(11) - 5;
_root.Game.resetShake--;
if (_root.Game.resetShake == 1) {
_root.Game.resetShake = 0;
_root.Game.bgxAdd = 0;
_root.Game.bgyAdd = 0;
}
}
var _local4;
_root.miniMap.bg.gotoAndStop(1);
if ((_root.Game.gameTime % 2) == 0) {
_root.Game.doChains();
}
_root.Game.particleController.run();
_root.Game.scriptController.run();
for (_local4 in _root.Game.NMELIST) {
_root.Game.NMELIST[_local4].run();
}
_root.Game.moveBG();
_root.Game.minimapControl.run();
_root.Game.fpsControl.run();
if (_root.Game.timeLimit > 0) {
_root.Game.updateTimer();
}
_root.Game.gameTime++;
}
}
if (_root.fadeCounter == 20) {
var _local3;
var _local6 = 0;
for (_local3 in _root.Game.TILES) {
_root.Game.TILES[_local3].removeMovieClip();
}
for (_local3 in _root.Game.NMELIST) {
_root.Game.NMELIST[_local3].mc.removeMovieClip();
}
for (_local3 in _root.Game.OBJECTS) {
_root.Game.OBJECTS[_local3].removeMovieClip();
}
for (_local3 in _root.Game.PLAYER.C4) {
_root.Game.PLAYER.C4[_local3].removeMovieClip();
}
for (_local3 in _root.Game.particleController.PARTICLES) {
_root.Game.particleController.PARTICLES[_local3].removeMovieClip();
}
_root.Game.exitMarker.removeMovieClip();
_root.miniMap.removeMovieClip();
this.Timer.removeMovieClip();
this.Timer2.removeMovieClip();
delete _root.onEnterFrame;
} else if (_root.fadeCounter == -25) {
if (_root.Game.loseType == "caught") {
if (_root.Game.PLAYER.onWall) {
_root.Game.PLAYER.setDir((_root.Game.PLAYER.dir + 2) % 4);
}
_root.Game.PLAYER.mc.gotoAndPlay(_root.Game.PLAYER.dirPrefix + "GU");
}
} else if (_root.fadeCounter == 3) {
var _local5 = _root.attachMovie("missionFailed", "missionFailedWindow", _root.getNextHighestDepth(), {i:0});
_local5.onEnterFrame = function () {
this._alpha = 80 + (Math.sin(this.i / 10) * 15);
this.i++;
};
} else if (_root.fadeCounter == 0) {
for (var _local4 in _root.Game.NMELIST) {
_root.Game.NMELIST[_local4].mc.stop();
}
}
if ((_root.fadeCounter >= 0) && (_root.fadeCounter < 20)) {
var _local6 = 0;
for (var _local3 in _root.Game.TILES) {
_root.Game.TILES[_local3]._alpha = 100 - (_root.fadeCounter * 5);
}
for (var _local3 in _root.Game.NMELIST) {
_root.Game.NMELIST[_local3].mc._alpha = 100 - (_root.fadeCounter * 5);
}
for (var _local3 in _root.Game.OBJECTS) {
_root.Game.OBJECTS[_local3]._alpha = 100 - (_root.fadeCounter * 5);
}
for (var _local3 in _root.Game.PLAYER.C4) {
_root.Game.PLAYER.C4[_local3]._alpha = 100 - (_root.fadeCounter * 5);
}
for (var _local3 in _root.Game.particleController.PARTICLES) {
_root.Game.particleController.PARTICLES[_local3]._alpha = 100 - (_root.fadeCounter * 5);
}
_root.Game.exitMarker._alpha = 100 - (_root.fadeCounter * 5);
_root.miniMap._alpha = 100 - (_root.fadeCounter * 5);
this.Timer._alpha = 100 - (_root.fadeCounter * 5);
this.Timer2._alpha = 100 - (_root.fadeCounter * 5);
}
_root.fadeCounter++;
};
}
function winMission() {
_root.popup2.removeMovieClip();
if (_global.currentLevel == _root.SOgetVar("Level")) {
if (_global.currentLevel < (_global.levels.length - 1)) {
_root.SOsetVar("Level", _root.SOgetVar("Level") + 1);
}
}
_global.currentLevel++;
_root.menuButton._visible = false;
var _local5;
PLAYER.mc.stop();
PLAYER.mc.paused = true;
paused = true;
Key.removeListener(keyListen);
for (_local5 in NMELIST) {
NMELIST[_local5].mc.stop();
}
_root.fadeCounter = 0;
_root.onEnterFrame = function () {
if (_root.fadeCounter == 20) {
var _local3;
var _local5 = 0;
for (_local3 in _root.Game.TILES) {
_root.Game.TILES[_local3].removeMovieClip();
}
for (_local3 in _root.Game.NMELIST) {
_root.Game.NMELIST[_local3].mc.removeMovieClip();
}
for (_local3 in _root.Game.OBJECTS) {
_root.Game.OBJECTS[_local3].removeMovieClip();
}
for (_local3 in _root.Game.PLAYER.C4) {
_root.Game.PLAYER.C4[_local3].removeMovieClip();
}
for (_local3 in _root.Game.particleController.PARTICLES) {
_root.Game.particleController.PARTICLES[_local3].removeMovieClip();
}
_root.Game.exitMarker.removeMovieClip();
_root.miniMap.removeMovieClip();
this.Timer.removeMovieClip();
this.Timer2.removeMovieClip();
delete _root.onEnterFrame;
} else if (_root.fadeCounter == 3) {
var _local4 = _root.attachMovie("missionComplete", "missionCompleteWindow", _root.getNextHighestDepth(), {i:0});
_local4.onEnterFrame = function () {
this._alpha = 80 + (Math.sin(this.i / 10) * 15);
this.i++;
};
_root.fadeCounter++;
} else {
var _local5 = 0;
for (var _local3 in _root.Game.TILES) {
_root.Game.TILES[_local3]._alpha = 100 - (_root.fadeCounter * 5);
}
for (var _local3 in _root.Game.NMELIST) {
_root.Game.NMELIST[_local3].mc._alpha = 100 - (_root.fadeCounter * 5);
}
for (var _local3 in _root.Game.OBJECTS) {
_root.Game.OBJECTS[_local3]._alpha = 100 - (_root.fadeCounter * 5);
}
for (var _local3 in _root.Game.PLAYER.C4) {
_root.Game.PLAYER.C4[_local3]._alpha = 100 - (_root.fadeCounter * 5);
}
for (var _local3 in _root.Game.particleController.PARTICLES) {
_root.Game.particleController.PARTICLES[_local3]._alpha = 100 - (_root.fadeCounter * 5);
}
_root.Game.exitMarker._alpha = 100 - (_root.fadeCounter * 5);
_root.miniMap._alpha = 100 - (_root.fadeCounter * 5);
this.Timer._alpha = 100 - (_root.fadeCounter * 5);
this.Timer2._alpha = 100 - (_root.fadeCounter * 5);
_root.fadeCounter++;
}
};
}
function cleanup() {
_root.popup2.removeMovieClip();
stopAllSounds();
Key.removeListener(keyListen);
delete _root.onEnterFrame;
var _local3;
for (_local3 in TILES) {
TILES[_local3].removeMovieClip();
}
delete TILES;
for (_local3 in NMELIST) {
NMELIST[_local3].mc.removeMovieClip();
delete NMELIST[_local3];
}
CHAINEXPLOSIONS.splice(0, CHAINEXPLOSIONS.length);
CHAINBREAKABLES.splice(0, CHAINBREAKABLES.length);
SCROLLABLES.splice(0, SCROLLABLES.length);
delete SCROLLABLES;
delete NMELIST;
_root.Timer.removeMovieClip();
exitMarker.removeMovieClip();
PLAYER.mc.removeMovieClip();
delete PLAYER;
_root.popup2.removeMovieClip();
_root.popup.removeMovieClip();
delete _root.Game;
_root.Game = undefined;
_root.onEnterFrame = undefined;
}
function padMap() {
var _local2 = 0;
while (_local2 < MAPINFO.length) {
MAPINFO[_local2].splice(0, 0, undefined, undefined, undefined);
MAPINFO[_local2].push(undefined);
_local2++;
}
var _local3 = getUndefLine(MAPINFO[0].length + 4);
MAPINFO.splice(0, 0, _local3);
MAPINFO.splice(0, 0, _local3);
MAPINFO.splice(0, 0, _local3);
MAPINFO.push(_local3);
}
function getUndefLine(length) {
var _local2 = new Array();
var _local1 = 0;
while (_local1 < length) {
_local2.push(undefined);
_local1++;
}
return(_local2);
}
function buildMap() {
var _local4 = 0;
while (_local4 < MAPSIZE) {
var _local5 = 0;
while (_local5 < MAPSIZE) {
var _local3 = _root.bg.attachMovie("tile2", (("t" + _local5) + "_") + _local4, makeTileDepth(_local5, _local4), {x:_local5, y:_local4});
_local3.oD = _local3.getDepth();
_local3.bD = _local3.oD - 50000;
_local3._x = ((_local4 - _local5) * 40) + XOFFSET;
_local3._y = ((_local5 + _local4) * 20) + YOFFSET;
if (clipTile(_local3)) {
_local3.gotoAndStop(1);
TILES.push(_local3);
} else {
_local3.removeMovieClip();
}
_local5++;
}
_local4++;
}
}
function doChains() {
var _local25 = CHAINBREAKABLES;
var _local29 = CHAINEXPLOSIONS;
var _local20 = BREAKWALLS;
var _local32 = particleChunks;
var _local6 = particleController;
var _local31 = tileParticleChunks;
if (_local25.length > 0) {
var _local16;
var _local39 = _local25.length;
var _local23 = 0;
while (_local23 < _local39) {
_local16 = _local25[_local23];
table[getPFI(_local16.x, _local16.y)] = 0;
if (SGM == false) {
var _local18 = _local32[_local16.objType];
var _local27 = _local18.length;
var _local9 = 1;
while (_local9 < _local27) {
_local6.addParticle(_local16.x, _local16.y, random(4) + 2, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(50) / 35, _local18[_local9], 0, _local18[0]);
_local9++;
}
}
removeScrollable(_local16);
_local16.removeMovieClip();
_local23++;
}
_local25.splice(0, _local25.length);
}
if (_local29.length > 0) {
var _local30 = new Array();
var _local38 = _local29.length;
var _local23 = 0;
while (_local23 < _local38) {
_local30.push(_local29[_local23]);
_local23++;
}
_local29.splice(0, _local29.length);
var _local7;
var _local33;
var _local40 = _local30.length;
_local23 = 0;
while (_local23 < _local40) {
_local7 = _local30[_local23];
if (SGM == false) {
var _local11 = _local32[_local7.objType];
var _local19 = _local11.length;
var _local9 = 1;
while (_local9 < _local19) {
_local6.addParticle(_local7.x, _local7.y, random(4) + 2, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(50) / 35, _local11[_local9], 0, _local11[0]);
_local9++;
}
}
if (_local7._visible) {
if (SGM == false) {
_local33 = addScrollable(_root.bg.attachMovie("explosion", "explosion" + random(60000), makeDepth(_local7.x, _local7.y) + 7, {x:_local7.x, y:_local7.y, z:0, depthbonus:1007}));
resetShake = resetShake + 3;
if (resetShake > 10) {
resetShake = 10;
}
} else {
_local33 = addScrollable(_root.bg.attachMovie("explosionSGM", "explosion" + random(60000), makeDepth(_local7.x, _local7.y) + 4007, {x:_local7.x, y:_local7.y, z:0, depthbonus:4007}));
}
}
soundController.playSoundPan("explode", _local7._x, true);
var _local12 = _local7.x + 2;
var _local15 = _local7.x - 2;
var _local13 = _local7.y + 2;
var _local14 = _local7.y - 2;
var _local28 = OBJECTS.length;
var _local8 = 0;
while (_local8 < _local28) {
var _local21 = OBJECTS[_local8];
if (_local21.destructable) {
if (_local21 != _local7) {
if ((((_local21.x < _local12) && (_local21.x > _local15)) && (_local21.y < _local13)) && (_local21.y > _local14)) {
OBJECTS.splice(_local8, 1);
_local8--;
_local29.push(_local21);
table[getPFI(_local21.x, _local21.y)] = 0;
}
}
}
if (_local21.breakable && (!_local21.destructable)) {
if ((((_local21.x < _local12) && (_local21.x > _local15)) && (_local21.y < _local13)) && (_local21.y > _local14)) {
_local25.push(_local21);
OBJECTS.splice(_local8, 1);
_local8--;
table[getPFI(_local21.x, _local21.y)] = 0;
}
}
_local8++;
}
var _local3;
for (var _local21 in NMELIST) {
_local3 = NMELIST[_local21];
if (!_local3.dead) {
if ((((Math.round(_local3.mc.x) < _local12) && (Math.round(_local3.mc.x) > _local15)) && (Math.round(_local3.mc.y) < _local13)) && (Math.round(_local3.mc.y) > _local14)) {
_local3.mc.paused = true;
_local3.mc.dead = true;
_local6.addParticle(_local3.mc.x, _local3.mc.y, 2, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(10) / 5, "nmeLegParticle1", random(200) - 100, 0);
_local6.addParticle(_local3.mc.x, _local3.mc.y, 2, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(10) / 5, "nmeLegParticle2", 0, 0);
_local6.addParticle(_local3.mc.x, _local3.mc.y, 5, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(10) / 5, "nmeHeadParticle1", random(60) - 30, 0);
_local6.addParticle(_local3.mc.x, _local3.mc.y, 4, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(10) / 5, "nmeArmParticle1", random(20) - 10, 0);
_local6.addParticle(_local3.mc.x, _local3.mc.y, 4, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(10) / 5, "nmeTorsoParticle1", random(20) - 10, 0);
_local6.addParticle(_local3.mc.x, _local3.mc.y, 3, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(10) / 5, "nmeGunParticle1", random(20) - 10, 0);
_local3.die();
_local3.deathCounter = 40;
_local3.fadeAway();
if (missionType == 3) {
loseMission();
}
}
}
}
if ((((Math.round(PLAYER.mc.x) < _local12) && (Math.round(PLAYER.mc.x) > _local15)) && (Math.round(PLAYER.mc.y) < _local13)) && (Math.round(PLAYER.mc.y) > _local14)) {
loseType = "explode";
_local6.addParticle(PLAYER.mc.x, PLAYER.mc.y, 5, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(10) / 5, "playerParticle0", random(60) - 30, 0);
_local6.addParticle(PLAYER.mc.x, PLAYER.mc.y, 4, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(10) / 5, "playerParticle1", random(20) - 10, 0);
_local6.addParticle(PLAYER.mc.x, PLAYER.mc.y, 2, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(10) / 5, "playerParticle2", random(30) - 15, 0);
_local6.addParticle(PLAYER.mc.x, PLAYER.mc.y, 4, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(10) / 5, "playerParticle3", random(30) - 15, 0);
_local6.addParticle(PLAYER.mc.x, PLAYER.mc.y, 2, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(10) / 5, "playerParticle4", random(20) - 10, 0);
_local6.addParticle(PLAYER.mc.x, PLAYER.mc.y, 4, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(10) / 5, "playerParticle5", random(40) - 20, 0);
_local6.addParticle(PLAYER.mc.x, PLAYER.mc.y, 3, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(10) / 5, "playerParticle6", random(20) - 10, 0);
_local6.addParticle(PLAYER.mc.x, PLAYER.mc.y, 3, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(10) / 5, "playerParticle7", random(100) - 50, 0);
loseMission();
}
var _local22 = false;
var _local5;
var _local4;
var _local24;
var _local26 = _local20.length;
var _local10 = 0;
while (_local10 < _local26) {
_local3 = _local20[_local10];
_local5 = _local3[0];
_local4 = _local3[1];
_local24 = _local3[2];
var _local17;
if ((((_local5 < _local12) && (_local5 > _local15)) && (_local4 < _local13)) && (_local4 > _local14)) {
MAPINFO[_local4][_local5] = _local24;
_local17 = _local3[4];
HITINFO[_local4][_local5] = _local17;
FLOORINFO[_local4][_local5] = _local3[3];
WALLINFO[_local4][_local5] = _local3[5];
VISIONINFO[_local4][_local5] = _local3[6];
HEIGHTINFO[_local4][_local5] = _local3[7];
if (_local17 || (_local17 == undefined)) {
table[getPFI(_local5, _local4)] = 1;
} else {
table[getPFI(_local5, _local4)] = 0;
minimapControl.mc.walls[(("wall" + _local5) + "x") + _local4].removeMovieClip();
}
if (SGM == false) {
var _local11 = _local31[_local3[8]];
var _local19 = _local11.length;
var _local9 = 1;
while (_local9 < _local19) {
_local6.addParticle(_local5, _local4, random(4) + 2, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(50) / 35, _local11[_local9], 0, _local11[0]);
_local9++;
}
}
_local22 = true;
_local20.splice(_local10, 1);
_local10--;
}
_local10++;
}
if (_local22) {
updateTiles();
}
removeScrollable(_local7);
makeNoise(_local7.x, _local7.y, 7, true);
_local7.removeMovieClip();
_local23++;
}
}
}
function switchTiles() {
var _local16;
if (SGM) {
_local16 = "tile2";
SGM = false;
} else {
_local16 = "altTile";
SGM = true;
}
_global.SGM = SGM;
var _local4;
var _local8;
var _local9;
var _local6;
var _local7;
var _local17 = TILES.length;
var _local5 = 0;
while (_local5 < _local17) {
_local4 = TILES[_local5];
_local7 = {x:_local4.x, y:_local4.y, _x:_local4._x, _y:_local4._y, oD:_local4.oD, bD:_local4.bD};
_local9 = _local4._name;
_local6 = _local4.getDepth();
_local4.removeMovieClip();
_local8 = _root.bg.attachMovie(_local16, _local9, _local6, _local7);
TILES.splice(_local5, 1, _local8);
_local5++;
}
updateTiles();
}
function getPFI(x, y) {
return((1200 + (Math.round(y) * 100)) + Math.round(x));
}
function buildInfoArrays() {
var _local7 = MAPINFO.length;
FLOORINFO = new Array(_local7);
HITINFO = new Array(_local7);
WALLINFO = new Array(_local7);
VISIONINFO = new Array(_local7);
HEIGHTINFO = new Array(_local7);
TRIGINFO = new Array(_local7);
FOOTSTEPINFO = new Array(_local7);
var _local2 = 0;
while (_local2 < _local7) {
var _local5 = MAPINFO[_local2].length;
FLOORINFO[_local2] = new Array(_local5);
HITINFO[_local2] = new Array(_local5);
WALLINFO[_local2] = new Array(_local5);
VISIONINFO[_local2] = new Array(_local5);
HEIGHTINFO[_local2] = new Array(_local5);
TRIGINFO[_local2] = new Array(_local5);
FOOTSTEPINFO[_local2] = new Array(_local5);
var _local3 = 0;
while (_local3 < _local5) {
var _local4 = MAPINFO[_local2][_local3];
FLOORINFO[_local2][_local3] = tileIsFloor(_local4);
HITINFO[_local2][_local3] = tileBlockable(_local4);
WALLINFO[_local2][_local3] = tileIsWall(_local4);
VISIONINFO[_local2][_local3] = tileIsTall(_local4);
HEIGHTINFO[_local2][_local3] = tileHeight(_local4);
TRIGINFO[_local2][_local3] = tileTrig(_local3, _local2);
FOOTSTEPINFO[_local2][_local3] = tileFootstep(_local4);
var _local6 = HITINFO[_local2][_local3];
if (_local6 || (_local6 == undefined)) {
table[getPFI(_local3, _local2)] = 1;
} else {
table[getPFI(_local3, _local2)] = 0;
}
_local3++;
}
_local2++;
}
}
function tileBlockable(tileNum) {
switch (tileNum) {
case 0 :
return(false);
case 30 :
return(false);
case 31 :
return(false);
case 32 :
return(false);
case 33 :
return(false);
case 34 :
return(false);
case 35 :
return(false);
case 36 :
return(false);
case 37 :
return(false);
case undefined :
return(true);
}
return(true);
}
function tileIsFloor(tileNum) {
switch (tileNum) {
case 0 :
return(true);
case 30 :
return(true);
case 31 :
return(true);
case 32 :
return(true);
case 33 :
return(true);
case 35 :
return(true);
case 36 :
return(true);
case 37 :
return(true);
case undefined :
return(false);
}
return(false);
}
function tileIsWall(tileNum) {
switch (tileNum) {
case 2 :
return([true, true, true, true]);
case 4 :
return([false, false, true, false]);
case 5 :
return([true, false, false, false]);
case 6 :
return([false, true, false, false]);
case 7 :
return([false, false, false, true]);
case 8 :
return([true, true, true, true]);
case 9 :
return([true, true, true, true]);
case 10 :
return([true, true, true, true]);
case 14 :
return([false, false, false, true]);
case 15 :
return([true, false, false, false]);
case 16 :
return([false, false, false, true]);
case 17 :
return([false, false, false, true]);
case 18 :
return([false, false, false, true]);
case 19 :
return([true, false, false, false]);
case 20 :
return([true, false, false, false]);
case 21 :
return([true, false, false, false]);
case 23 :
return([false, false, true, true]);
case 24 :
return([false, true, true, false]);
case 25 :
return([true, false, false, true]);
case 26 :
return([true, true, false, false]);
case 28 :
return([true, true, true, true]);
case 29 :
return([true, true, true, true]);
case 38 :
return([false, false, false, true]);
case 39 :
return([true, false, false, false]);
case 41 :
return([true, false, false, true]);
case 60 :
return([false, true, true, true]);
case 61 :
return([false, true, true, true]);
case 62 :
return([true, true, true, false]);
case 63 :
return([true, true, true, false]);
case 91 :
return([false, true, true, true]);
case 92 :
return([true, true, true, false]);
case 93 :
return([false, true, true, true]);
case 94 :
return([true, true, true, false]);
case undefined :
return([false, false, false, false]);
}
return([false, false, false, false]);
}
function tileIsTall(tileNum) {
switch (tileNum) {
case 0 :
return(false);
case 22 :
return(false);
case 27 :
return(false);
case 30 :
return(false);
case 31 :
return(false);
case 32 :
return(false);
case 33 :
return(false);
case 35 :
return(false);
case 36 :
return(false);
case 37 :
return(false);
case 42 :
return(false);
case 43 :
return(false);
case 44 :
return(false);
case 45 :
return(false);
case 46 :
return(false);
case 47 :
return(false);
case 48 :
return(false);
case 49 :
return(false);
case 50 :
return(false);
case 51 :
return(false);
case 52 :
return(false);
case 53 :
return(false);
case 57 :
return(false);
case 58 :
return(false);
case 59 :
return(false);
case 68 :
return(false);
case 69 :
return(false);
case 70 :
return(false);
case 71 :
return(false);
case 72 :
return(false);
case 73 :
return(false);
case 74 :
return(false);
case 75 :
return(false);
case 76 :
return(false);
case 77 :
return(false);
case 78 :
return(false);
case 79 :
return(false);
case 80 :
return(false);
case 81 :
return(false);
case 82 :
return(false);
case 83 :
return(false);
case 84 :
return(false);
case 85 :
return(false);
case 86 :
return(false);
case 87 :
return(false);
case 88 :
return(false);
case 89 :
return(false);
case 90 :
return(false);
case undefined :
return(true);
}
return(true);
}
function tileHeight(tileNum) {
switch (tileNum) {
case 0 :
return(0);
case 27 :
return(6);
case 28 :
return(12);
case 29 :
return(12);
case 30 :
return(0);
case 31 :
return(0);
case 32 :
return(0);
case 33 :
return(0);
case 34 :
return(0);
case 35 :
return(0);
case 36 :
return(0);
case 37 :
return(0);
case 42 :
return(0);
case 43 :
return(0);
case 44 :
return(0);
case 45 :
return(0);
case 46 :
return(0);
case 47 :
return(0);
case 48 :
return(0);
case 49 :
return(0);
case 50 :
return(0);
case 51 :
return(0);
case 52 :
return(0);
case 53 :
return(0);
case 57 :
return(1);
case 58 :
return(4);
case 59 :
return(0);
case 68 :
return(6);
case 69 :
return(6);
case 70 :
return(6);
case 71 :
return(6);
case 72 :
return(6);
case 73 :
return(6);
case 74 :
return(6);
case 75 :
return(6);
case 76 :
return(6);
case 77 :
return(6);
case 78 :
return(6);
case 79 :
return(6);
case 80 :
return(6);
case 81 :
return(6);
case 82 :
return(6);
case 83 :
return(6);
case 84 :
return(6);
case 85 :
return(6);
case 86 :
return(6);
case 87 :
return(6);
case 88 :
return(6);
case 89 :
return(6);
case 90 :
return(6);
case undefined :
return(100);
}
return(100);
}
function tileExplosionType(tileNum) {
switch (tileNum) {
case 2 :
return(2);
case 27 :
return(1);
case 28 :
return(1);
case 29 :
return(1);
case 57 :
return(3);
case 58 :
return(3);
case 59 :
return(3);
case 68 :
return(4);
case 69 :
return(4);
case 70 :
return(4);
case 71 :
return(4);
case 72 :
return(4);
case 73 :
return(4);
case 74 :
return(4);
case 75 :
return(4);
case 76 :
return(4);
case 77 :
return(4);
case 78 :
return(4);
case 79 :
return(4);
case 80 :
return(4);
case 81 :
return(4);
case 82 :
return(4);
case 83 :
return(4);
case 84 :
return(4);
case 85 :
return(4);
case 86 :
return(4);
case 87 :
return(4);
case 88 :
return(4);
case 89 :
return(4);
case 90 :
return(4);
case undefined :
return(0);
}
return(0);
}
function tileFootstep(tileNum) {
switch (tileNum) {
case 0 :
return(0);
case 30 :
return(1);
case 31 :
return(1);
case 32 :
return(1);
case 33 :
return(1);
case 34 :
return(1);
case 35 :
return(2);
case 36 :
return(2);
case 37 :
return(0);
case undefined :
return(undefined);
}
return(undefined);
}
function tileTrig(x, y) {
var _local2;
for (_local2 in TRIGGERS) {
_local2 = TRIGGERS[_local2];
if ((_local2[0] == x) && (_local2[1] == y)) {
return(_local2);
}
}
}
function clipTile(tile) {
if (tile._x >= -40) {
if (tile._y >= -20) {
if (tile._x <= 680) {
if (tile._y <= 540) {
return(true);
}
}
}
}
return(false);
}
function moveBG() {
var _local6 = (-mapx) % 1;
var _local5 = (-mapy) % 1;
var _local4 = Math.ceil(-mapx);
var _local3 = Math.ceil(-mapy);
_root.bg._x = ((_local6 - _local5) * 40) + bgxAdd;
_root.bg._y = ((_local6 + _local5) * 20) + bgyAdd;
scrollObjects();
if ((_local4 != oldmapx) || (_local3 != oldmapy)) {
oldmapx = _local4;
oldmapy = _local3;
updateTiles();
}
}
function scrollObjects() {
var _local3;
var _local11 = 0;
var _local9 = 0;
var _local14 = 0;
var _local13 = 0;
var _local4;
var _local6;
var _local5;
var _local8;
var _local7;
var _local16 = Math.ceil(-mapx);
var _local15 = Math.ceil(-mapy);
var _local10 = SCROLLABLES;
var _local12 = _root;
for (_local3 in _local10) {
_local3 = _local10[_local3];
_local6 = _local3.x + 6;
_local5 = _local3.y + 6;
_local11 = _local16 + Math.floor(_local6);
_local9 = _local15 + Math.floor(_local5);
_local14 = _local16 + Math.round(_local6);
_local13 = _local15 + Math.round(_local5);
_local4 = _local12.bg[(("t" + _local9) + "_") + _local11];
if (_local4 != undefined) {
_local8 = _local5 % 1;
_local7 = _local6 % 1;
_local3._x = _local4._x + ((_local7 - _local8) * 40);
_local3._y = (_local4._y + ((_local7 + _local8) * 20)) - (_local3.z * 10);
_local3.swapDepths((_local12.bg[(("t" + _local13) + "_") + _local14].oD + 2) + _local3.depthbonus);
_local3._visible = true;
} else {
_local3._visible = false;
}
}
}
function updateTiles() {
var _local2;
var _local8 = Math.ceil(-mapy) + 6;
var _local9 = Math.ceil(-mapx) + 6;
var _local5;
var _local4;
var _local3;
var _local6 = TILES;
var _local10 = FLOORINFO;
var _local7 = MAPINFO;
for (_local2 in _local6) {
_local2 = _local6[_local2];
_local4 = _local2.x - _local8;
_local3 = _local2.y - _local9;
_local5 = _local7[_local4][_local3];
if (_local5 == undefined) {
_local2.gotoAndStop("blank");
} else {
_local2.gotoAndStop(_local5 + 1);
if (_local10[_local4][_local3]) {
_local2.swapDepths(_local2.bD);
} else {
_local2.swapDepths(_local2.oD);
}
}
}
}
function addScrollable(mc) {
mc.scrollIndex = SCROLLABLES.length;
SCROLLABLES.push(mc);
return(mc);
}
function removeScrollable(mc) {
SCROLLABLES.splice(mc.scrollIndex, 1);
var _local2 = mc.scrollIndex;
while (_local2 < SCROLLABLES.length) {
SCROLLABLES[_local2].scrollIndex--;
_local2++;
}
}
function removeObject(mc) {
OBJECTS.splice(mc.objIndex, 1);
var _local2 = mc.objIndex;
while (_local2 < OBJECTS.length) {
OBJECTS[_local2].objIndex--;
_local2++;
}
}
function checkTriggers() {
var _local4;
if (!PLAYER.onWall) {
var _local6 = PLAYER.mc.x - 3;
var _local5 = PLAYER.mc.y - 3;
} else {
var _local6 = PLAYER.oldWallX - 3;
var _local5 = PLAYER.oldWallY - 3;
}
_local4 = TRIGINFO[_local5][_local6];
if (_local4 != undefined) {
if (_local4[3] == 0) {
if (PLAYER.currTrig != undefined) {
PLAYER.currTrig = undefined;
}
scriptController.executeScript(_local4[2]);
PLAYER.mc.trigIndic.gotoAndStop(1);
var _local3 = scriptController.LIBRARY[_local4[2]];
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2][0] == 18) {
return(true);
}
_local2++;
}
return(false);
}
PLAYER.currTrig = _local4;
return(false);
}
PLAYER.currTrig = undefined;
PLAYER.mc.trigIndic.gotoAndStop(1);
return(false);
}
function hitTest(x, y) {
if ((HITINFO[Math.ceil(y)][Math.ceil(x)] == true) || (HITINFO[Math.ceil(y)][Math.ceil(x)] == undefined)) {
return(false);
}
return(true);
}
function visionTest(x, y) {
return(VISIONINFO[Math.ceil(y)][Math.ceil(x)]);
}
function playerHitTest(x, y, guy) {
if (hitTest(x, y)) {
var _local3;
for (_local3 in NMELIST) {
var _local2 = NMELIST[_local3].mc;
if (!_local2.dead) {
if (((Math.round(_local2.x) == x) && (Math.round(_local2.y) == y)) || ((Math.round(_local2.ref.tx) == x) && (Math.round(_local2.ref.ty) == y))) {
return(false);
}
}
}
} else {
return(false);
}
return(true);
}
function playerWallHitTest(x, y, guy) {
var _local3;
for (_local3 in NMELIST) {
var _local2 = NMELIST[_local3].mc;
if (!_local2.dead) {
if (((Math.round(_local2.x) == x) && (Math.round(_local2.y) == y)) || ((Math.round(_local2.ref.tx) == x) && (Math.round(_local2.ref.ty) == y))) {
return(NMELIST[_local3]);
}
}
}
return(undefined);
}
function objectHitTest(dx, dy, mc, checkPush) {
var _local7 = mc.x + dx;
var _local6 = mc.y + dy;
var _local4;
var _local10;
var _local3 = false;
var _local11 = OBJECTS.length;
var _local2 = 0;
while (_local2 < _local11) {
_local4 = OBJECTS[_local2];
if ((_local7 == _local4.x) && (_local6 == _local4.y)) {
if (checkPush) {
if (_local4.pushable && (!mc.ref.onWall)) {
if (playerHitTest(_local7 + dx, _local6 + dy, mc)) {
if (objectHitTest(dx * 2, dy * 2, mc, false)) {
_local10 = OBJECTS[_local2];
_local3 = false;
} else {
_local3 = true;
}
} else {
_local3 = true;
}
} else {
_local3 = true;
}
} else {
_local3 = true;
}
break;
}
_local2++;
}
if (_local10 != undefined) {
mc.ref.pushing = _local10;
}
return(!_local3);
}
function checkIfWall(x, y) {
return(WALLINFO[y][x]);
}
function makeTileDepth(x, y) {
return(((y * 1000) + (x * 10)) + 50000);
}
function makeDepth(x, y) {
x = x - (Math.ceil(mapy) - 7);
y = y - (Math.ceil(mapx) - 7);
return((y * 1000) + (x * 10));
}
function nmeCount() {
return(nmeCounter++);
}
function objCount() {
return(objCounter++);
}
function openMenu() {
paused = true;
_root.attachMovie("igMenu", "igMenu", _root.getNextHighestDepth());
_root.igMenu.setMask(_root.igMenu.wiper);
delete _global.menuFunc;
_root.igMenu.wiper.gotoAndPlay("reveal");
_global.menuFrame = 1;
_global.menuFrame = undefined;
_root.onEnterFrame = function () {
_root.Game.fpsControl.run();
};
if (PLAYER.mc.stoppable) {
PLAYER.mc.stop();
}
_root.popup2._visible = false;
for (var _local5 in NMELIST) {
var _local5 = NMELIST[_local5].mc;
if (_local5.stoppable) {
_local5.stop();
}
}
_root.menuButton._visible = false;
var _local4 = new flash.filters.BlurFilter();
_local4.quality = 3;
_local4.blurX = random(5) + 5;
_local4.blurY = random(5) + 5;
_root.bg.filters = [_local4];
_quality = "BEST";
}
var NMELIST = new Array();
var SCROLLABLES = new Array();
var CHAINEXPLOSIONS = new Array();
var CHAINBREAKABLES = new Array();
var XOFFSET = 320;
var YOFFSET = -140;
var MAPSIZE = 21;
var SGM = false;
var mapy = 1;
var mapx = 1;
var oldmapy = MapController.prototype.mapy;
var oldmapx = MapController.prototype.mapx;
var missionType = 0;
var killedEnemies = 0;
var secondCounter = 0;
var secondCounter2 = 0;
var nmeCounter = 0;
var objCounter = 0;
var resetShake = 0;
var bgxAdd = 0;
var bgyAdd = 0;
}
Symbol 1165 MovieClip [__Packages.PlayerController] Frame 0
class PlayerController
{
var map, scriptController, mc, C4, C4amount, LOMAX, LOSPEED, HIMAX, HISPEED, SPEED, MAXCOUNTER, WALLCOUNTER, WALLSPEED, counter, animCycle, tx, ty, inMotion, dir, slidex, oldWallX, slidey, oldWallY, wallKey, wallKeyL, slidexL, slideyL, wallKeyR, slidexR, slideyR, dirPrefix, currTrig, C4pickup, xscaler, vx, vy, wallAnimAdder, pushing, animInterval;
function PlayerController (game, x, y, C4amount) {
map = game;
scriptController = game.scriptController;
mc = _root.bg.attachMovie("guy", "buddyLee", game.makeDepth(x, y) + 4, {x:x, y:y, z:0, stoppable:false, radius:radius, paused:false, ref:this, depthbonus:4});
game.addScrollable(mc);
C4 = new Array();
this.C4amount = C4amount;
_root.c1.gotoAndStop((C4amount % 10) + 1);
_root.c2.gotoAndStop(Math.floor(C4amount / 10) + 1);
scriptController.VARIABLES.C4AMOUNT = C4amount;
LOMAX = 10;
LOSPEED = 1 / LOMAX;
HIMAX = 6;
HISPEED = 1 / HIMAX;
SPEED = LOSPEED;
MAXCOUNTER = LOMAX;
WALLCOUNTER = 10;
WALLSPEED = 1 / WALLCOUNTER;
counter = 0;
animCycle = 0;
tx = x;
ty = y;
stand(2);
}
function run() {
if (!mc.paused) {
checkDetonation();
if (!onWall) {
var _local3 = false;
if (inMotion) {
move();
_local3 = true;
}
if (!inMotion) {
if (!skipCheck) {
checkKeys();
if (SPACEDOWN) {
checkSpacebar();
}
} else {
skipCheck = false;
}
}
if (_local3 && (!inMotion)) {
stand(dir);
}
} else {
var _local3 = false;
if (inMotion) {
wallMove();
_local3 = true;
}
if (!inMotion) {
if (!skipCheck) {
mc.x = oldWallX + (wallTransferCounter * slidex);
mc.y = oldWallY + (wallTransferCounter * slidey);
mc.trigIndic.gotoAndStop(1);
if (Key.isDown(wallKey)) {
wallTransferCounter++;
if (wallTransferCounter >= 3) {
wallTransferCounter = 3;
var _local2 = false;
if (Key.isDown(wallKeyL)) {
if (map.playerHitTest(oldWallX + slidexL, oldWallY + slideyL, mc)) {
if (map.WALLINFO[(oldWallY + slideyL) + (slidey * 10)][(oldWallX + slidexL) + (slidex * 10)][dir]) {
if (map.table[map.getPFI(mc.x + slidexL, mc.y + slideyL)] == 0) {
_local2 = true;
setWallMove(slidexL, slideyL, 1);
}
}
}
} else if (Key.isDown(wallKeyR)) {
if (map.playerHitTest(oldWallX + slidexR, oldWallY + slideyR, mc)) {
if (map.WALLINFO[(oldWallY + slideyR) + (slidey * 10)][(oldWallX + slidexR) + (slidex * 10)][dir]) {
if (map.table[map.getPFI(mc.x + slidexR, mc.y + slideyR)] == 0) {
_local2 = true;
setWallMove(slidexR, slideyR, -1);
}
}
}
}
if (!_local2) {
mc.gotoAndStop(dirPrefix + "WT3");
}
map.scriptController.VARIABLES.ONWALL = 1;
} else if (!idleOnWall) {
idleOnWall = true;
mc.gotoAndStop((dirPrefix + "WT") + wallTransferCounter);
}
} else {
wallTransferCounter--;
idleOnWall = false;
if (wallTransferCounter <= 0) {
wallTransferCounter = 0;
map.scriptController.VARIABLES.ONWALL = 0;
onWall = false;
mc.x = oldWallX;
mc.y = oldWallY;
stand((dir + 2) % 4);
var _local5 = map.scriptController.VARIABLES.PLAYERX - 3;
var _local4 = map.scriptController.VARIABLES.PLAYERY - 3;
if (map.TRIGINFO[_local4][_local5][3] == 1) {
mc.trigIndic.gotoAndStop(2);
} else {
mc.trigIndic.gotoAndStop(1);
}
} else {
mc.gotoAndStop((dirPrefix + "WT") + wallTransferCounter);
}
}
} else {
skipCheck = false;
}
}
if ((!inMotion) && (_local3)) {
wallStand();
}
}
}
}
function checkSpacebar() {
if (!inMotion) {
if (!onWall) {
var _local3 = false;
var _local2;
var _local7;
var _local6;
var _local5;
var _local4;
for (_local2 in map.NMELIST) {
_local2 = map.NMELIST[_local2];
if (!_local2.mc.dead) {
_local7 = Math.round(mc.x);
_local6 = Math.round(mc.y);
_local5 = Math.round(_local2.mc.x);
_local4 = Math.round(_local2.mc.y);
if (_local4 == _local6) {
if (_local5 == (_local7 - 1)) {
_local3 = true;
snapNeck(3, _local2);
}
if (_local5 == (_local7 + 1)) {
_local3 = true;
snapNeck(1, _local2);
}
}
if (_local5 == _local7) {
if (_local4 == (_local6 - 1)) {
_local3 = true;
snapNeck(0, _local2);
}
if (_local4 == (_local6 + 1)) {
_local3 = true;
snapNeck(2, _local2);
}
}
if (_local3) {
break;
}
}
}
if ((!_local3) && (currTrig != undefined)) {
if (!SPACEDOWN) {
map.scriptController.executeScript(currTrig[2]);
}
}
} else if (Key.isDown(wallKey)) {
if (wallTransferCounter >= 3) {
wallTap();
}
}
}
}
function keyPress(keyCode) {
if ((!mc.paused) && (!map.paused)) {
if (keyCode == _global.actionKey) {
if (SPACEDOWN == false) {
checkSpacebar();
SPACEDOWN = true;
}
} else if (Key.isDown(_global.plantC4key)) {
if (!inMotion) {
if (!onWall) {
var _local5 = false;
var _local6;
var _local7 = C4.length;
var _local4 = 0;
while (_local4 < _local7) {
if ((C4[_local4].x == mc.x) && (C4[_local4].y == mc.y)) {
_local5 = true;
_local6 = C4[_local4];
break;
}
_local4++;
}
if (!_local5) {
if (C4amount > 0) {
mc.gotoAndPlay(dirPrefix + "C4");
mc.paused = true;
}
} else {
C4pickup = _local6;
mc.gotoAndPlay(dirPrefix + "C4");
mc.paused = true;
}
}
}
} else if (Key.isDown(_global.detonateC4key)) {
if (!C4keyDown) {
C4detonate();
C4keyDown = true;
}
} else if (Key.isDown(80)) {
} else if (Key.isDown(77)) {
if (_root.igMenu == undefined) {
map.openMenu();
}
} else if (Key.isDown(82)) {
map.cleanup();
_root.gotoAndStop("bouncer");
}
}
}
function keyUp(keycode) {
if (keycode == _global.detonateC4key) {
C4keyDown = false;
C4delay = 0;
} else if (keycode == _global.actionKey) {
SPACEDOWN = false;
}
}
function dropC4() {
if (C4pickup == undefined) {
var _local5 = map.minimapControl.addC4blip(mc.x, mc.y);
C4.push(map.addScrollable(_root.bg.attachMovie("C4", "C4" + C4Cycler(), map.makeDepth(mc.x, mc.y) - 1, {x:mc.x, y:mc.y, z:0, depthbonus:-1, objType:0, blip:_local5})));
C4amount--;
map.soundController.playSoundPan("c4click", 320, false);
updateC4();
} else {
map.minimapControl.removeC4blip(mc.x, mc.y);
var _local11;
var _local4 = C4.length;
var _local3 = 0;
while (_local3 < _local4) {
if (C4[_local3] == C4pickup) {
C4pickup.removeMovieClip();
C4.splice(_local3, 1);
break;
}
_local3++;
}
C4amount++;
map.soundController.playSoundPan("c4click", 320, false);
updateC4();
C4pickup = undefined;
}
}
function checkDetonation() {
if (Key.isDown(_global.detonateC4key)) {
C4delay++;
if (C4delay > 4) {
C4detonate();
}
}
}
function C4detonate() {
if ((C4.length > 0) && (!map.paused)) {
var _local2 = C4[0];
map.CHAINEXPLOSIONS.push(_local2);
map.minimapControl.removeC4blip(_local2.x, _local2.y);
C4.splice(0, 1);
}
}
function snapNeck(dir, nme) {
if (Key.isDown(_global.actionKey)) {
if ((map.missionType == 4) || (map.missionType == 3)) {
map.loseType = "neckBreak";
map.loseMission();
}
mc.paused = true;
inMotion = true;
setDir(dir);
mc._xscale = xscaler;
if (dir == 0) {
nme.tx = mc.x;
nme.ty = mc.y - 1;
} else if (dir == 1) {
nme.tx = mc.x + 1;
nme.ty = mc.y;
} else if (dir == 2) {
nme.tx = mc.x;
nme.ty = mc.y + 1;
} else if (dir == 3) {
nme.tx = mc.x - 1;
nme.ty = mc.y;
}
nme.mc.paused = true;
nme.setDir(dir);
nme.mc._xscale = nme.xscaler;
mc.gotoAndPlay(dirPrefix + "NS");
nme.mc.gotoAndPlay(nme.dirPrefix + "NS");
}
}
function wallTap() {
mc.gotoAndPlay(dirPrefix + "TAP");
mc.paused = true;
}
function wallTap2() {
map.makeNoise(oldWallX, oldWallY, 6, false);
map.soundController.playSoundPan("walltap", mc._x, false);
}
function wallStand() {
mc.gotoAndStop(dirPrefix + "WSS");
animCycle = 0;
}
function wallMove() {
counter++;
mc.x = mc.x + vx;
mc.y = mc.y + vy;
oldWallX = oldWallX + vx;
oldWallY = oldWallY + vy;
map.mapx = map.mapx + vx;
map.mapy = map.mapy + vy;
animCycle = animCycle + wallAnimAdder;
if (animCycle == 15) {
animCycle = 0;
} else if (animCycle == -1) {
animCycle = 14;
}
mc.gotoAndStop((dirPrefix + "WS") + animCycle);
if (counter == WALLCOUNTER) {
oldWallX = Math.round(oldWallX);
oldWallY = Math.round(oldWallY);
updateCoordVars(oldWallX, oldWallY);
map.checkPosition(oldWallX, oldWallY);
counter = 0;
inMotion = false;
mc.depthbonus = 0;
vx = 0;
vy = 0;
if (map.checkTriggers()) {
skipCheck = true;
}
} else if (counter == 6) {
if (vx > 0) {
mc.depthbonus = 0;
}
} else if (counter == 1) {
if (vx > 0) {
if (dir == 0) {
mc.depthbonus = 1000;
}
} else if (vx < 0) {
if ((!map.HITINFO[Math.round(mc.y + 1)][Math.round(mc.x)]) && (!map.HITINFO[Math.round(mc.y + 1)][Math.round(mc.x + 1)])) {
mc.depthbonus = 1000;
}
}
}
}
function setWallMove(ssx, ssy, adder) {
vx = ssx * WALLSPEED;
vy = ssy * WALLSPEED;
inMotion = true;
counter = 0;
wallAnimAdder = adder;
if (vx < 0) {
tx--;
} else if (vx > 0) {
tx++;
} else if (vy < 0) {
ty--;
} else if (vy > 0) {
ty++;
}
}
function setSlide(thedir) {
switch (thedir) {
case 0 :
slidey = -0.1;
slidex = 0;
wallKey = _global.upKey;
wallKeyL = _global.leftKey;
slidexL = -1;
slideyL = 0;
wallKeyR = _global.rightKey;
slidexR = 1;
slideyR = 0;
setDir(0);
break;
case 1 :
slidey = 0;
slidex = 0.1;
wallKey = _global.rightKey;
wallKeyL = _global.upKey;
slidexL = 0;
slideyL = -1;
wallKeyR = _global.downKey;
slidexR = 0;
slideyR = 1;
setDir(1);
break;
case 2 :
slidey = 0.1;
slidex = 0;
wallKey = _global.downKey;
wallKeyL = _global.leftKey;
slidexL = -1;
slideyL = 0;
wallKeyR = _global.rightKey;
slidexR = 1;
slideyR = 0;
setDir(2);
break;
case 3 :
slidey = 0;
slidex = -0.1;
wallKey = _global.leftKey;
wallKeyL = _global.upKey;
slidexL = 0;
slideyL = -1;
wallKeyR = _global.downKey;
slidexR = 0;
slideyR = 1;
setDir(3);
}
mc.x = Math.round(mc.x);
mc.y = Math.round(mc.y);
oldWallX = mc.x;
oldWallY = mc.y;
mc._xscale = xscaler;
onWall = true;
wallTransferCounter = 0;
}
function move() {
counter++;
mc.x = mc.x + vx;
mc.y = mc.y + vy;
if (pushing != undefined) {
pushing.x = pushing.x + vx;
pushing.y = pushing.y + vy;
}
map.mapx = map.mapx + vx;
map.mapy = map.mapy + vy;
animCycle = animCycle + animInterval;
if (animCycle >= 14) {
animCycle = animCycle - 14;
}
mc.gotoAndStop(dirPrefix + Math.round(animCycle));
if (counter == 1) {
mc._xscale = xscaler;
if (dir == 1) {
mc.depthbonus = 1;
}
if (pushing != undefined) {
map.table[map.getPFI(pushing.x - vx, pushing.y - vy)] = 0;
map.table[map.getPFI(pushing.x + (vx * (MAXCOUNTER - 1)), pushing.y + (vy * (MAXCOUNTER - 1)))] = 1;
}
} else if (counter == MAXCOUNTER) {
mc.x = Math.round(mc.x);
mc.y = Math.round(mc.y);
updateCoordVars(mc.x, mc.y);
if (pushing != undefined) {
pushing.x = Math.round(pushing.x);
pushing.y = Math.round(pushing.y);
pushing = undefined;
}
map.checkPosition(mc.x, mc.y);
counter = 0;
inMotion = false;
vx = 0;
vy = 0;
mc.depthbonus = 0;
if (map.checkTriggers()) {
skipCheck = true;
}
}
}
function setMove(mx, my, thedir) {
inMotion = true;
vy = my;
vx = mx;
setDir(thedir);
var _local3 = map.scriptController.VARIABLES.PLAYERX - 3;
var _local2 = map.scriptController.VARIABLES.PLAYERY - 3;
switch (thedir) {
case 0 :
if (map.TRIGINFO[_local2 - 1][_local3][3] == 1) {
mc.trigIndic.gotoAndStop(2);
}
tx = _local3;
ty = _local2 - 1;
break;
case 1 :
if (map.TRIGINFO[_local2][_local3 + 1][3] == 1) {
mc.trigIndic.gotoAndStop(2);
}
tx = _local3 + 1;
ty = _local2;
break;
case 2 :
if (map.TRIGINFO[_local2 + 1][_local3][3] == 1) {
mc.trigIndic.gotoAndStop(2);
}
tx = _local3;
ty = _local2 + 1;
break;
case 3 :
if (map.TRIGINFO[_local2][_local3 - 1][3] == 1) {
mc.trigIndic.gotoAndStop(2);
}
tx = _local3 - 1;
ty = _local2;
}
}
function checkKeys() {
SPEED = HISPEED;
MAXCOUNTER = HIMAX;
animInterval = 1.25;
if (Key.isDown(_global.upKey)) {
if (map.playerHitTest(mc.x, mc.y - 1, mc)) {
if (map.objectHitTest(0, -1, mc, true)) {
setMove(0, -SPEED, 0, mc.x, mc.y - 1);
} else {
stand(0);
}
} else {
var _local3 = map.playerWallHitTest(mc.x, mc.y - 1, mc);
if (_local3 == undefined) {
if (map.WALLINFO[mc.y - 1][mc.x][0]) {
setSlide(0, mc.x, mc.y - 1);
} else {
stand(0);
}
} else {
snapNeck(0, _local3);
}
}
} else if (Key.isDown(_global.downKey)) {
if (map.playerHitTest(mc.x, mc.y + 1, mc)) {
if (map.objectHitTest(0, 1, mc, true)) {
setMove(0, SPEED, 2, mc.x, mc.y + 1);
} else {
stand(2);
}
} else {
var _local3 = map.playerWallHitTest(mc.x, mc.y + 1, mc);
if (_local3 == undefined) {
if (map.WALLINFO[mc.y + 1][mc.x][2]) {
setSlide(2, mc.x, mc.y + 1);
} else {
stand(2);
}
} else {
snapNeck(2, _local3);
}
}
} else if (Key.isDown(_global.leftKey)) {
if (map.playerHitTest(mc.x - 1, mc.y, mc)) {
if (map.objectHitTest(-1, 0, mc, true)) {
setMove(-SPEED, 0, 3, mc.x - 1, mc.y);
} else {
stand(3);
}
} else {
var _local3 = map.playerWallHitTest(mc.x - 1, mc.y, mc);
if (_local3 == undefined) {
if (map.WALLINFO[mc.y][mc.x - 1][3]) {
setSlide(3, mc.x - 1, mc.y);
} else {
stand(3);
}
} else {
snapNeck(3, _local3);
}
}
} else if (Key.isDown(_global.rightKey)) {
if (map.playerHitTest(mc.x + 1, mc.y, mc)) {
if (map.objectHitTest(1, 0, mc, true)) {
setMove(SPEED, 0, 1, mc.x + 1, mc.y);
} else {
stand(1);
}
} else {
var _local3 = map.playerWallHitTest(mc.x + 1, mc.y, mc);
if (_local3 == undefined) {
if (map.WALLINFO[mc.y][mc.x + 1][1]) {
setSlide(1, mc.x + 1, mc.y);
} else {
stand(1);
}
} else {
snapNeck(1, _local3);
}
}
}
}
function stand(thedir) {
map.scriptController.VARIABLES.ONWALL = 0;
setDir(thedir);
mc.gotoAndStop(dirPrefix + "S");
animCycle = 0;
mc._xscale = xscaler;
}
function setDir(thedir) {
dir = thedir;
switch (thedir) {
case 0 :
dirPrefix = "N";
xscaler = 100;
break;
case 1 :
dirPrefix = "S";
xscaler = -100;
break;
case 2 :
dirPrefix = "S";
xscaler = 100;
break;
case 3 :
dirPrefix = "N";
xscaler = -100;
}
}
function C4Cycler() {
C4Cycle++;
if (C4Cycle > 100) {
C4Cycle = 0;
}
return(C4Cycle);
}
function setLocation(x, y) {
var _local5 = mc.x;
var _local4 = mc.y;
mc.x = x;
mc.y = y;
oldWallX = x;
oldWallY = y;
inMotion = false;
onWall = false;
vx = 0;
vy = 0;
counter = 0;
map.mapx = map.mapx + (x - _local5);
map.mapy = map.mapy + (y - _local4);
if (map.TRIGINFO[y - 3][x - 3][3] == 1) {
mc.trigIndic.gotoAndStop(2);
} else {
mc.trigIndic.gotoAndStop(1);
}
updateCoordVars(x, y);
}
function updateCoordVars(x, y) {
scriptController.VARIABLES.PLAYERX = x;
scriptController.VARIABLES.PLAYERY = y;
}
function updateC4() {
scriptController.VARIABLES.C4AMOUNT = C4amount;
_root.c1.gotoAndStop((C4amount % 10) + 1);
_root.c2.gotoAndStop(Math.floor(C4amount / 10) + 1);
}
var idleOnWall = false;
var wallTransferCounter = 0;
var onWall = false;
var transferingOntoWall = false;
var radius = 0.2;
var C4Cycle = 0;
var dontSGM = false;
var C4delay = 0;
var C4keyDown = false;
var SPACEDOWN = false;
var skipCheck = false;
}
Symbol 1166 MovieClip [__Packages.ScriptController] Frame 0
class ScriptController
{
var MAP, SCRIPTS, LIBRARY, VARIABLES, REDRAW, CS;
function ScriptController (theMap) {
MAP = theMap;
SCRIPTS = new Array();
LIBRARY = new Array();
VARIABLES = new Object();
REDRAW = false;
VARIABLES.C4AMOUNT = 0;
VARIABLES.HASTIMER = 0;
}
function run() {
var _local4 = SCRIPTS;
var _local2 = 0;
while (_local2 < _local4.length) {
CS = _local4[_local2];
var _local3;
REDRAW = false;
while (_local3 = executeInstruction() , _local3 > 0) {
}
if (REDRAW) {
MAP.updateTiles();
}
if (_local3 == -1) {
_local4.splice(_local2, 1);
_local2--;
} else if (_local3 == -2) {
CS.CI++;
break;
}
_local2++;
}
}
function addScript(script) {
var _local6 = "|";
var _local5 = new Array();
_local5 = script.split(_local6);
LIBRARY.push(new Array(_local5.length));
var _local3 = LIBRARY[LIBRARY.length - 1];
var _local2 = 0;
while (_local2 < _local5.length) {
var _local4 = _local5[_local2].split(",");
_local3[_local2] = new Array(_local4.length);
_local3[_local2] = _local4;
_local3[_local2][0] = Number(_local3[_local2][0]);
_local2++;
}
}
function executeScript(index) {
if (index == -1) {
return(undefined);
}
SCRIPTS.push({WAITTIMER:0, WAITMAX:-1, CI:0, IL:LIBRARY[index]});
}
function stopAllScripts() {
SCRIPTS.splice(0, SCRIPTS.length);
}
function executeInstruction() {
var _local9 = CS;
var _local5 = _local9.IL[_local9.CI];
var _local8 = _local5[0];
if (_local8 < 10) {
if (_local8 == 0) {
VARIABLES[_local5[1]] = parseVariable(_local5[2]);
} else if (_local8 == 1) {
var _local19 = parseVariable(_local5[1]);
var _local18 = parseVariable(_local5[3]);
var _local15;
var _local16 = _local5[2];
if (_local16 == "==") {
_local15 = _local19 == _local18;
} else if (_local16 == "!=") {
_local15 = _local19 != _local18;
} else if (_local16 == "<") {
_local15 = _local19 < _local18;
} else if (_local16 == ">") {
_local15 = _local19 > _local18;
} else if (_local16 == "<=") {
_local15 = _local19 <= _local18;
} else if (_local16 == ">=") {
_local15 = _local19 >= _local18;
} else if (_local16 == "=") {
_local15 = _local19 == _local18;
}
if (!_local15) {
_local9.CI = _local9.CI + Number(_local5[4]);
}
} else if (_local8 == 2) {
VARIABLES[_local5[1]] = VARIABLES[_local5[1]] + parseVariable(_local5[2]);
} else if (_local8 == 3) {
VARIABLES[_local5[1]] = VARIABLES[_local5[1]] - parseVariable(_local5[2]);
} else if (_local8 == 4) {
VARIABLES[_local5[1]] = VARIABLES[_local5[1]] * parseVariable(_local5[2]);
} else if (_local8 == 5) {
VARIABLES[_local5[1]] = VARIABLES[_local5[1]] / parseVariable(_local5[2]);
} else if (_local8 == 6) {
} else {
if (_local8 == 7) {
if (_local9.WAITTIMER == _local9.WAITMAX) {
_local9.WAITTIMER = 0;
_local9.WAITMAX = -1;
// unexpected jump
}
if (_local9.WAITTIMER == 0) {
_local9.WAITMAX = parseVariable(_local5[1]);
_local9.WAITTIMER++;
return(0);
}
_local9.WAITTIMER++;
return(0);
}
if (_local8 == 8) {
return(-1);
}
if (_local8 == 9) {
_local9.CI = _local5[1] - 1;
}
}
} else if (_local8 < 20) {
if (_local8 == 14) {
var _local3 = MAP;
var _local29 = parseVariable(_local5[1]) + 3;
var _local28 = parseVariable(_local5[2]) + 3;
var _local17 = parseVariable(_local5[3]) - 1;
_local3.MAPINFO[_local28][_local29] = _local17;
var _local25 = _local3.tileBlockable(_local17);
_local3.HITINFO[_local28][_local29] = _local25;
_local3.FLOORINFO[_local28][_local29] = _local3.tileIsFloor(_local17);
_local3.WALLINFO[_local28][_local29] = _local3.tileIsWall(_local17);
_local3.VISIONINFO[_local28][_local29] = _local3.tileIsTall(_local17);
_local3.HEIGHTINFO[_local28][_local29] = _local3.tileHeight(_local17);
_local3.FOOTSTEPINFO[_local28][_local29] = _local3.tileFootstep(_local17);
if (_local25 || (_local25 == undefined)) {
if (_local3.table[_local3.getPFI(_local29, _local28)] == 0) {
_local3.minimapControl.mc.walls.attachMovie("miniMapWall", (("wall" + _local29) + "x") + _local28, (1000 + (_local28 * 500)) + _local29, {_x:_local29 * 5, _y:_local28 * 5});
} else {
var _local6;
var _local20 = _local3.OBJECTS;
var _local21 = _local20.length;
var _local11 = 0;
while (_local11 < _local21) {
_local6 = _local20[_local11];
if (_local6.x == _local29) {
if (_local6.y == _local28) {
if (_local3.SGM == false) {
var _local10 = _local3.particleChunks[_local6.objType];
var _local7 = 1;
while (_local7 < _local10.length) {
_local3.particleController.addParticle((_local6.x + random(3)) - 1, (_local6.y + random(3)) - 1, 5, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(5) / 2, _local10[_local7], 0);
_local7++;
}
}
_local3.OBJECTS.splice(_local11, 1);
_local3.removeScrollable(_local6);
_local6.removeMovieClip();
break;
}
}
_local11++;
}
}
_local3.table[_local3.getPFI(_local29, _local28)] = 1;
if ((_local29 == (_local3.PLAYER.tx + 3)) && (_local28 == (_local3.PLAYER.ty + 3))) {
if (_local3.PLAYER.onWall) {
_local3.PLAYER.wallTransferCounter = 0;
_local3.PLAYER.onWall = false;
_local3.PLAYER.mc.x = _local3.PLAYER.oldWallX;
_local3.PLAYER.mc.y = _local3.PLAYER.oldWallY;
_local3.PLAYER.tx = _local3.PLAYER.mc.x;
_local3.PLAYER.ty = _local3.PLAYER.mc.y;
_local3.PLAYER.stand((_local3.PLAYER.dir + 2) % 4);
}
if (_local3.table[_local3.getPFI(_local29 - 1, _local28)] == 0) {
_local3.PLAYER.mc.x--;
_local3.PLAYER.tx--;
_local3.mapx--;
} else if (_local3.table[_local3.getPFI(_local29 + 1, _local28)] == 0) {
_local3.PLAYER.mc.x++;
_local3.PLAYER.tx++;
_local3.mapx++;
} else if (_local3.table[_local3.getPFI(_local29, _local28 - 1)] == 0) {
_local3.PLAYER.mc.y--;
_local3.PLAYER.ty--;
_local3.mapy--;
} else if (_local3.table[_local3.getPFI(_local29, _local28 + 1)] == 0) {
_local3.PLAYER.mc.y++;
_local3.PLAYER.ty++;
_local3.mapy++;
}
}
var _local12 = _local3.NMELIST;
var _local4;
for (_local4 in _local12) {
_local4 = _local12[_local4];
if (_local4.tx == _local29) {
if (_local4.ty == _local28) {
if (_local3.table[_local3.getPFI(_local29 - 1, _local28)] == 0) {
_local4.mc.x--;
_local4.tx--;
} else if (_local3.table[_local3.getPFI(_local29 + 1, _local28)] == 0) {
_local4.mc.x++;
_local4.tx++;
} else if (_local3.table[_local3.getPFI(_local29, _local28 - 1)] == 0) {
_local4.mc.y--;
_local4.ty--;
} else if (_local3.table[_local3.getPFI(_local29, _local28 + 1)] == 0) {
_local4.mc.y++;
_local4.ty++;
}
_local4.clearPrimaryQueue();
_local4.primaryCommand(1, 10);
_local4.primaryCommand(10);
break;
}
}
}
} else {
_local3.table[_local3.getPFI(_local29, _local28)] = 0;
_local3.minimapControl.mc.walls[(("wall" + _local29) + "x") + _local28].removeMovieClip();
}
REDRAW = true;
} else if (_local8 == 10) {
MAP.soundController.playSound(_local5[1], false);
} else if (_local8 == 11) {
MAP.PLAYER.setLocation(Number(parseVariable(_local5[1])) + 3, Number(parseVariable(_local5[2])) + 3);
} else if (_local8 == 12) {
var _local29 = parseVariable(_local5[1]) + 2;
var _local28 = parseVariable(_local5[2]) + 2;
MAP.CHAINEXPLOSIONS.push({x:_local29 + 1, y:_local28 + 1, _visible:true});
} else if (_local8 == 13) {
MAP.placeFinish(true);
} else if (_local8 == 15) {
executeScript(Number(_local5[1]));
} else if (_local8 == 16) {
var _local27 = true;
if (_root.popup == undefined) {
}
var _local14 = parseVariable(_local5[1]);
if (_local14 == 0) {
_root.attachMovie("popup", "popup", _root.getNextHighestDepth(), {lifetime:100, scriptCaller:_local9});
_root.popup.text = parseVariable(_local5[2]);
_root.popup.gotoAndStop(_local14 + 1);
} else if (_local14 == 1) {
_root.attachMovie("popup", "popup", _root.getNextHighestDepth(), {lifetime:100, scriptCaller:_local9});
_root.popup.text = parseVariable(_local5[2]);
_root.popup.gotoAndStop(_local14 + 1);
} else if (_local14 == 2) {
_root.attachMovie("popup", "popup", _root.getNextHighestDepth(), {lifetime:100, scriptCaller:_local9});
_root.popup.text = parseVariable(_local5[2]);
_root.popup.gotoAndStop(_local14 + 1);
} else if (_local14 == 3) {
if (_local5[2] == "off") {
_root.popup2.removeMovieClip();
} else {
if (_root.popup2 == undefined) {
_root.attachMovie("popup", "popup2", _root.getNextHighestDepth(), {lifetime:100, scriptCaller:_local9, type:2});
}
_root.popup2.text = parseVariable(_local5[2]);
_root.popup2.gotoAndStop(_local14 + 1);
}
_local27 = false;
}
if (_local27) {
_root.popup2._visible = false;
MAP.paused = true;
MAP.PLAYER.mc.paused = true;
_root.onEnterFrame = function () {
_root.Game.fpsControl.run();
};
if (MAP.PLAYER.mc.stoppable) {
MAP.PLAYER.mc.stop();
}
for (var _local24 in MAP.NMELIST) {
var _local24 = MAP.NMELIST[_local24].mc;
if (_local24.stoppable) {
_local24.stop();
}
}
_root.menuButton._visible = false;
var _local22 = new flash.filters.BlurFilter();
_local22.quality = 3;
_local22.blurX = random(5) + 5;
_local22.blurY = random(5) + 5;
_root.bg.filters = [_local22];
_quality = "BEST";
return(-2);
}
} else {
if (_local8 == 17) {
if (((Math.round(MAP.mapx) == _local9.ENDX) && (Math.round(MAP.mapy) == _local9.ENDY)) && (_local9.WAITTIMER > 0)) {
MAP.mapx = Math.round(MAP.mapx);
MAP.mapy = Math.round(MAP.mapy);
_local9.WAITTIMER = 0;
// unexpected jump
}
if (_local9.WAITTIMER == 0) {
VARIABLES.PLAYERX = VARIABLES.PLAYERX - 3;
VARIABLES.PLAYERY = VARIABLES.PLAYERY - 3;
_local9.ENDX = parseVariable(_local5[1]);
_local9.ENDY = parseVariable(_local5[2]);
VARIABLES.PLAYERX = VARIABLES.PLAYERX + 3;
VARIABLES.PLAYERY = VARIABLES.PLAYERY + 3;
_local9.STARTX = Math.round(MAP.mapx);
_local9.STARTY = Math.round(MAP.mapy);
_local9.WAITTIMER++;
return(0);
}
MAP.mapx = MAP.mapx + ((_local9.ENDX - _local9.STARTX) / 20);
MAP.mapy = MAP.mapy + ((_local9.ENDY - _local9.STARTY) / 20);
_local9.WAITTIMER++;
return(0);
}
if (_local8 == 18) {
MAP.PLAYER.mc.paused = true;
} else if (_local8 == 19) {
MAP.PLAYER.mc.paused = false;
}
}
} else if (_local8 < 30) {
if (_local8 == 20) {
MAP.particleController.addParticle(Number(parseVariable(_local5[2])), Number(parseVariable(_local5[3])), Number(parseVariable(_local5[4])), Number(parseVariable(_local5[5])), Number(parseVariable(_local5[6])), Number(parseVariable(_local5[7])), _local5[1], random(10) - 5, Number(_local5[8]));
} else if (_local8 == 21) {
VARIABLES.PLAYERX = VARIABLES.PLAYERX - 3;
VARIABLES.PLAYERY = VARIABLES.PLAYERY - 3;
var _local29 = parseVariable(_local5[1]);
var _local28 = parseVariable(_local5[2]);
VARIABLES.PLAYERX = VARIABLES.PLAYERX + 3;
VARIABLES.PLAYERY = VARIABLES.PLAYERY + 3;
MAP.TRIGINFO[_local28][_local29] = undefined;
if ((_local29 == (VARIABLES.PLAYERX - 3)) && (_local28 == (VARIABLES.PLAYERY - 3))) {
MAP.PLAYER.currTrig = undefined;
MAP.PLAYER.mc.trigIndic.gotoAndStop(1);
}
} else if (_local8 == 22) {
MAP.TRIGINFO[parseVariable(_local5[2])][parseVariable(_local5[1])] = [Number(_local5[1]), Number(_local5[2]), Number(_local5[3]), Number(_local5[4])];
} else if (_local8 == 23) {
MAP.winMission();
} else if (_local8 == 24) {
MAP.loseMission();
} else if (_local8 == 25) {
var _local29 = parseVariable(_local5[1]);
var _local28 = parseVariable(_local5[2]);
if ((_local29 == -1) && (_local28 == -1)) {
MAP.minimapControl.waypoint = undefined;
MAP.minimapControl.mc.draw.clear();
} else {
MAP.minimapControl.waypoint = [(_local29 + 3) * 5, (_local28 + 3) * 5];
}
} else if (_local8 == 26) {
var _local23 = parseVariable(_local5[1]);
var _local13;
if (MAP.Timer2 == undefined) {
_local13 = _root.attachMovie("Timer", "Timer2", 201, {_x:580, _y:270});
_local13.scriptNum = _local5[2];
_local13.color = new Color(_local13);
_local13.color.setTransform({ra:100, ga:75, ba:0, rb:74, gb:64});
MAP.Timer2 = _local13;
if (_root.Timer != undefined) {
_local13._y = 245;
}
} else {
_local13 = _root.Timer2;
}
var _local26 = _local23 % 60;
var _local31 = Math.floor(_local23 / 60);
_local13.m1.gotoAndStop((_local31 % 10) + 1);
_local13.m2.gotoAndStop(Math.floor(_local31 / 10) + 1);
_local13.s1.gotoAndStop((_local26 % 10) + 1);
_local13.s2.gotoAndStop(Math.floor(_local26 / 10) + 1);
VARIABLES.TIMER = _local23;
VARIABLES.HASTIMER = 1;
MAP.timeLimit2 = _local23;
} else if (_local8 == 27) {
VARIABLES.PLAYERX = VARIABLES.PLAYERX - 3;
VARIABLES.PLAYERY = VARIABLES.PLAYERY - 3;
MAP.mapx = Number(parseVariable(_local5[1]));
MAP.mapy = Number(parseVariable(_local5[2]));
VARIABLES.PLAYERX = VARIABLES.PLAYERX + 3;
VARIABLES.PLAYERY = VARIABLES.PLAYERY + 3;
} else if (_local8 == 28) {
var _local30 = Number(parseVariable(_local5[1]));
if (MAP.PLAYER.dir != _local30) {
MAP.PLAYER.stand(_local30);
}
} else if (_local8 == 29) {
}
} else if (_local8 < 40) {
if (_local8 == 30) {
MAP.PLAYER.C4amount = MAP.PLAYER.C4amount + parseVariable(_local5[1]);
MAP.PLAYER.updateC4();
} else if (_local8 == 31) {
VARIABLES[_local5[1]] = VARIABLES[_local5[1]] % parseVariable(_local5[2]);
} else if (_local8 == 32) {
} else if (_local8 == 33) {
} else if (_local8 == 34) {
_root.Timer2.removeMovieClip();
MAP.Timer2 = undefined;
MAP.timeLimit2 = undefined;
MAP.secondCounter2 = 0;
VARIABLES.TIMER = 0;
VARIABLES.HASTIMER = 0;
}
}
_local9.CI++;
if (_local9.CI >= _local9.IL.length) {
_local9.CI = 0;
return(0);
}
return(1);
}
function parseVariable(str) {
if (isNaN(str)) {
var _local14 = String.fromCharCode(13);
var _local8 = VARIABLES;
var _local4;
while (_local4 = str.indexOf("%") , _local4 != -1) {
var _local6 = str.indexOf("%", _local4 + 1);
var _local7 = _local8[str.substring(_local4 + 1, _local6)];
str = (str.substring(0, _local4) + _local7) + str.substring(_local6 + 1, str.length);
}
str = str.split("~br~").join(_local14);
str = str.split("~c~").join(",");
str = str.split("_").join(" ");
if (!isNaN(str)) {
str = Number(str);
} else if (str.substring(0, 6) == "floor(") {
str = str.substring(6, str.length - 1);
var _local11 = str.split("/");
var _local12 = Number(_local11[0]) + 3;
var _local13 = Number(_local11[1]) + 3;
if ((Math.round(_local8.PLAYERX) == _local12) && (Math.round(_local8.PLAYERY) == _local13)) {
str = 1;
} else {
var _local9 = false;
var _local10 = MAP.NMELIST.length;
var _local3 = 0;
while (_local3 < _local10) {
var _local5 = MAP.NMELIST[_local3];
if ((Math.round(_local5.mc.x) == _local12) && (Math.round(_local5.mc.y) == _local13)) {
str = 1;
_local9 = true;
break;
}
_local3++;
}
if (!_local9) {
str = Number(MAP.table[MAP.getPFI(_local12, _local13)]);
}
}
} else if (str.substring(0, 5) == "rand(") {
str = str.substring(5, str.length - 1);
var _local11 = str.split("/");
var _local12 = Number(_local11[0]);
var _local13 = Number(_local11[1]);
str = random((_local13 - _local12) + 1) + _local12;
}
} else {
return(Number(str));
}
return(str);
}
function deletePopup(script) {
_root.popup.removeMovieClip();
_root.Game.fpsControl.lastFPS = 20;
_root.Game.paused = false;
_root.Game.PLAYER.mc.paused = false;
_root.onEnterFrame = function () {
_root.Game.run();
};
if (_root.Game.PLAYER.mc.stoppable) {
_root.Game.PLAYER.mc.play();
}
for (var _local2 in _root.Game.NMELIST) {
var _local2 = _root.Game.NMELIST[_local2].mc;
if (_local2.stoppable) {
_local2.play();
}
}
_quality = "LOW";
_root.menuButton._visible = true;
_root.Game.fpsControl.lastFPS = 20;
_root.bg.filters = [];
if (_root.popup2 != undefined) {
_root.popup2._visible = true;
}
}
}
Symbol 1167 MovieClip [__Packages.EnemyController] Frame 0
class EnemyController
{
var startX, startY, startDir, currentCommand, currentCommandPrimary, footsteps, tx, ty, map, CMDQUEUE, CMDQUEUEPRIMARY, target, targetRef, mc, SPEED, MAXCOUNTER, HISPEED, HIMAX, LOSPEED, LOMAX, counter, animCycle, startAngle, angle, inMotion, dir, previousX, previousY, xscaler, dirPrefix, oldAngle, previousDir, previousAngle, vx, vy, px, py;
function EnemyController (themap, x, y, thedir, cmds) {
startX = x;
startY = y;
startDir = thedir;
currentCommand = 0;
currentCommandPrimary = 0;
footsteps = new Array(["footstep1", "footstep2"], ["grassFootstep1", "grassFootstep2"], ["metalFootstep1", "metalFootstep2"]);
tx = x;
ty = y;
map = themap;
CMDQUEUE = parseActions(cmds);
CMDQUEUEPRIMARY = new Array();
target = themap.PLAYER.mc;
targetRef = themap.PLAYER;
mc = _root.bg.attachMovie("enemy", "nme" + map.nmeCount(), map.makeDepth(x, y) + 1, {x:x, y:y, z:0, ref:this, paused:false, dead:false, stoppable:false, depthbonus:1});
map.addScrollable(mc);
SPEED = 0.125;
MAXCOUNTER = 1 / SPEED;
HISPEED = 0.166666666666667;
HIMAX = 1 / HISPEED;
LOSPEED = 0.125;
LOMAX = 1 / LOSPEED;
counter = 0;
animCycle = 0;
stand(thedir);
startAngle = angle;
}
function run() {
if (!mc.paused) {
var _local3 = false;
scanVision();
if (!targetRef.onWall) {
if ((Math.round(target.x) == mc.x) && (Math.round(target.y) == mc.y)) {
if (_root.miniMap.bg._currentframe != 2) {
_root.miniMap.bg.gotoAndStop(2);
setExclamMark();
map.loseType = "caught";
map.loseMission();
}
}
} else if ((Math.round(targetRef.oldWallX) == mc.x) && (Math.round(targetRef.oldWallY) == mc.y)) {
if (_root.miniMap.bg._currentframe != 2) {
_root.miniMap.bg.gotoAndStop(2);
setExclamMark();
map.loseType = "caught";
map.loseMission();
}
}
if (inMotion) {
move();
_local3 = true;
}
if (!inMotion) {
if (CMDQUEUEPRIMARY.length > 0) {
queue = 1;
runCommand(CMDQUEUEPRIMARY[currentCommandPrimary]);
} else {
queue = 0;
runCommand(CMDQUEUE[currentCommand]);
}
}
if (_local3 && (!inMotion)) {
stand(dir);
}
if (explodeDelay > 0) {
explodeDelay--;
}
} else if (mc.dead) {
if (deathCounter == 0) {
die();
} else {
fadeAway();
}
}
}
function parseActions(text) {
var _local4 = text.split("&");
var _local3 = new Array();
var _local1;
var _local2 = 0;
while (_local2 < _local4.length) {
_local1 = _local4[_local2].split("x");
if (_local1.length > 0) {
if (_local1[1] != undefined) {
_local3.push([Number(_local1[0]), Number(_local1[1])]);
} else {
_local3.push([Number(_local1[0])]);
}
}
_local2++;
}
return(_local3);
}
function die() {
map.minimapControl.killEnemy(mc);
mc.depthbonus = -1;
deathCounter++;
}
function fadeAway() {
if (deathCounter == 40) {
var _local3;
var _local2 = 0;
while (_local2 < map.NMELIST.length) {
_local3 = map.NMELIST[_local2];
if (_local3 == this) {
map.NMELIST.splice(_local2, 1);
break;
}
_local2++;
}
map.killEnemy();
map.minimapControl.removeEnemy(mc);
map.removeScrollable(mc);
mc.removeMovieClip();
} else {
deathCounter++;
if ((deathCounter % 5) == 0) {
if (mc._alpha == 0) {
mc._alpha = 100;
} else {
mc._alpha = 0;
}
}
}
}
function runCommand(command) {
var _local2 = command[0];
if (_local2 == 1) {
if (wait(command[1])) {
advanceQueue();
}
} else if (_local2 == 2) {
if (rotateTo(command[1])) {
advanceQueue();
}
} else if (_local2 == 0) {
if (walk(command[1])) {
advanceQueue();
}
} else if (_local2 == 3) {
if (lookaround(command[1])) {
advanceQueue();
}
} else if (_local2 == 4) {
stand(command[1]);
advanceQueue();
} else if (_local2 == 5) {
setQuestionMark(command[1]);
advanceQueue();
} else if (_local2 == 6) {
setExclamMark(command[1]);
advanceQueue();
} else if (_local2 == 7) {
stand(dir);
advanceQueue();
} else if (_local2 == 8) {
SPEED = LOSPEED;
MAXCOUNTER = LOMAX;
advanceQueue();
} else if (_local2 == 9) {
SPEED = HISPEED;
MAXCOUNTER = HIMAX;
advanceQueue();
} else if (_local2 == 10) {
clearPrimaryQueue();
pathfindTo(previousX, previousY, false, true, false, false);
} else if (_local2 == 11) {
lured = false;
advanceQueue();
}
}
function clearPrimaryQueue() {
CMDQUEUEPRIMARY.splice(0, CMDQUEUEPRIMARY.length);
waitTimer = 0;
lookAroundCounter = 0;
currentCommandPrimary = 0;
}
function primaryCommand(theCmd, param) {
CMDQUEUEPRIMARY.push([theCmd, param]);
}
function scanVision() {
var _local11 = Math.abs(mc.x - target.x);
var _local10 = Math.abs(mc.y - target.y);
var _local15 = Math.sqrt((_local11 * _local11) + (_local10 * _local10));
var _local13 = alertTimer;
if (_local15 < MAXDIST) {
var _local14 = (((Math.atan2(mc.y - target.y, mc.x - target.x) / Math.PI) * 180) + 270) % 360;
if (angleInRange(_local14)) {
var _local7 = false;
var _local9 = Math.atan2(target.y - mc.y, target.x - mc.x);
var _local6 = ((target.x - mc.x) + (Math.cos(_local9 + 4.71238898038469) * target.radius)) / PRECISION;
var _local8 = ((target.y - mc.y) + (Math.sin(_local9 + 4.71238898038469) * target.radius)) / PRECISION;
var _local4 = mc.x;
var _local3 = mc.y;
var _local5 = 0;
while (_local5 < PRECISION) {
if (map.visionTest(Math.round(_local4), Math.round(_local3))) {
_local7 = true;
break;
}
_local4 = _local4 + _local6;
_local3 = _local3 + _local8;
_local5++;
}
_local6 = ((target.x - mc.x) + (Math.cos(_local9 + (Math.PI/2)) * target.radius)) / PRECISION;
_local8 = ((target.y - mc.y) + (Math.sin(_local9 + (Math.PI/2)) * target.radius)) / PRECISION;
_local4 = mc.x;
_local3 = mc.y;
_local5 = 0;
while (_local5 < PRECISION) {
if (map.visionTest(Math.round(_local4), Math.round(_local3))) {
_local7 = true;
break;
}
_local4 = _local4 + _local6;
_local3 = _local3 + _local8;
_local5++;
}
if (!_local7) {
alertTimer++;
if (alertTimer >= maxAlert) {
if (map.loseType != "caught") {
_root.miniMap.bg.gotoAndStop(2);
setExclamMark();
map.loseType = "caught";
map.loseMission();
}
} else {
_root.miniMap.bg.gotoAndStop(3);
}
clearPrimaryQueue();
primaryCommand(2, (((Math.atan2(mc.y - target.y, mc.x - target.x) / Math.PI) * 180) + 270) % 360);
} else {
alertTimer = 0;
}
} else {
alertTimer = 0;
}
} else {
alertTimer = 0;
}
if ((_local13 > 0) && (alertTimer == 0)) {
var _local12 = pathfindTo(Math.round(target.x), Math.round(target.y), true, false, true, false);
if (!_local12) {
pathfindTo(previousX, previousY, false, true, false, false);
}
}
}
function angleInRange(pangle) {
var _local2 = Math.abs(pangle - angle);
if (_local2 > 180) {
_local2 = 360 - _local2;
}
if (_local2 < VISIONWIDTH) {
return(true);
}
return(false);
}
function rotateTo(desiredAngle) {
var _local3 = false;
angle = angle + (getRotDifference(angle, desiredAngle) * ROTATESPEED);
if (angle > 360) {
angle = angle - 360;
}
if (angle < 0) {
angle = angle + 360;
}
if ((angle > (desiredAngle - ROTATESPEED)) && (angle < (desiredAngle + ROTATESPEED))) {
angle = desiredAngle;
_local3 = true;
}
var _local2 = (angle + 215) % 360;
if (_local2 < 0) {
_local2 = 360 - _local2;
}
if (_local2 > 180) {
mc._xscale = -100;
mc.qmark._xscale = -100;
xscaler = -100;
_local2 = _local2 % 180;
mc.gotoAndStop("rot" + (17 - Math.floor(_local2 / 10)));
} else {
mc._xscale = 100;
mc.qmark._xscale = 100;
xscaler = 100;
mc.gotoAndStop("rot" + Math.floor(_local2 / 10));
}
if (_local3) {
return(true);
}
return(false);
}
function getRotDifference(num1, num2) {
if (num1 < num2) {
if ((num2 - num1) > 180) {
return(-1);
}
return(1);
}
if (num2 < num1) {
if ((num1 - num2) > 180) {
return(1);
}
return(-1);
}
return(0);
}
function advanceQueue() {
if (queue == 0) {
currentCommand++;
if (currentCommand >= CMDQUEUE.length) {
currentCommand = 0;
}
} else {
currentCommandPrimary++;
if (currentCommandPrimary >= CMDQUEUEPRIMARY.length) {
CMDQUEUEPRIMARY.splice(0, CMDQUEUEPRIMARY.length);
currentCommandPrimary = 0;
}
}
}
function walk(thedir) {
var _local3;
var _local2;
if (targetRef.onWall) {
_local3 = targetRef.oldWallX;
_local2 = targetRef.oldWallY;
} else {
_local3 = Math.round(target.x);
_local2 = Math.round(target.y);
}
switch (thedir) {
case 0 :
if ((map.playerHitTest(mc.x, mc.y - 1, mc) && (map.table[map.getPFI(mc.x, mc.y - 1)] == 0)) && ((_local3 != mc.x) || (_local2 != (mc.y - 1)))) {
setMove(0, -SPEED, 0);
tx = mc.x;
ty = mc.y - 1;
blockedCounter = 0;
return(true);
}
smash(mc.x, mc.y - 1);
stand(0);
blockInc();
break;
case 1 :
if ((map.playerHitTest(mc.x + 1, mc.y, mc) && (map.table[map.getPFI(mc.x + 1, mc.y)] == 0)) && ((_local3 != (mc.x + 1)) || (_local2 != mc.y))) {
setMove(SPEED, 0, 1);
tx = mc.x + 1;
ty = mc.y;
blockedCounter = 0;
return(true);
}
smash(mc.x + 1, mc.y);
stand(1);
blockInc();
break;
case 2 :
if ((map.playerHitTest(mc.x, mc.y + 1, mc) && (map.table[map.getPFI(mc.x, mc.y + 1)] == 0)) && ((_local3 != mc.x) || (_local2 != (mc.y + 1)))) {
setMove(0, SPEED, 2);
tx = mc.x;
ty = mc.y + 1;
blockedCounter = 0;
return(true);
}
smash(mc.x, mc.y + 1);
stand(2);
blockInc();
break;
case 3 :
if ((map.playerHitTest(mc.x - 1, mc.y, mc) && (map.table[map.getPFI(mc.x - 1, mc.y)] == 0)) && ((_local3 != (mc.x - 1)) || (_local2 != mc.y))) {
setMove(-SPEED, 0, 3);
tx = mc.x - 1;
ty = mc.y;
blockedCounter = 0;
return(true);
}
smash(mc.x - 1, mc.y);
stand(3);
blockInc();
}
return(false);
}
function smash(x, y) {
var _local2;
var _local5 = 0;
while (_local5 < map.OBJECTS.length) {
_local2 = map.OBJECTS[_local5];
if ((_local2.x == x) && (_local2.y == y)) {
map.table[map.getPFI(_local2.x, _local2.y)] = 0;
if (map.SGM == false) {
var _local4 = map.particleChunks[_local2.objType];
var _local3 = 1;
while (_local3 < _local4.length) {
map.particleController.addParticle(_local2.x, _local2.y, 5, (random(10) - 5) * 0.09, (random(10) - 5) * 0.09, random(5) / 2, _local4[_local3], 0);
_local3++;
}
}
map.OBJECTS.splice(_local5, 1);
map.removeScrollable(_local2);
_local2.removeMovieClip();
break;
}
_local5++;
}
}
function wait(max) {
waitTimer++;
if (waitTimer == max) {
waitTimer = 0;
return(true);
}
return(false);
}
function lookaround() {
if (lookAroundCounter == 0) {
mc.stoppable = true;
mc.gotoAndPlay(dirPrefix + "LA0");
oldAngle = angle;
angle = angle - 1;
lookAroundCounter++;
}
if (angle == oldAngle) {
angle = oldAngle;
lookAroundCounter = 0;
stand(dir);
mc.stoppable = false;
return(true);
}
return(false);
}
function setQuestionMark(cmd) {
mc.qmark.gotoAndPlay("qmark");
mc.qmark._xscale = mc._xscale;
}
function setExclamMark(cmd) {
mc.qmark.gotoAndPlay("emark");
mc.qmark._xscale = mc._xscale;
}
function blockInc() {
blockedCounter++;
if (blockedCounter >= 4) {
blockedCounter = 0;
previousX = startX;
previousY = startY;
previousDir = startDir;
previousAngle = startAngle;
var _local2 = pathfindTo(startX, startY, false, true, false, false);
currentCommand = 0;
if (!_local2) {
}
}
}
function move() {
counter++;
mc.x = mc.x + vx;
mc.y = mc.y + vy;
animCycle++;
if (animCycle == 15) {
animCycle = 1;
}
mc.gotoAndStop(dirPrefix + animCycle);
if (counter == 1) {
mc._xscale = xscaler;
mc.qmark._xscale = xscaler;
} else if (counter == MAXCOUNTER) {
counter = 0;
inMotion = false;
vx = 0;
vy = 0;
mc.x = Math.round(mc.x);
mc.y = Math.round(mc.y);
}
}
function setMove(mx, my, thedir) {
inMotion = true;
vy = my;
vx = mx;
setDir(thedir);
}
function stand(thedir) {
setDir(thedir);
mc.gotoAndStop(dirPrefix + "S");
animCycle = 0;
mc._xscale = xscaler;
mc.qmark._xscale = xscaler;
}
function setDir(thedir) {
dir = thedir;
switch (thedir) {
case 0 :
dirPrefix = "N";
xscaler = 100;
angle = 0;
break;
case 1 :
dirPrefix = "S";
xscaler = -100;
angle = 90;
break;
case 2 :
dirPrefix = "S";
xscaler = 100;
angle = 180;
break;
case 3 :
dirPrefix = "N";
xscaler = -100;
angle = 270;
}
}
function pathfinder(sx, sy, x, y, noRecurse) {
var _local9 = map.getPFI(Math.round(sx), Math.round(sy));
var _local14 = map.getPFI(Math.round(x), Math.round(y));
var _local13 = 0;
while (_local13 < map.NMELIST.length) {
var _local12 = map.NMELIST[_local13].mc;
if (_local12 != mc) {
map.table[map.getPFI(_local12.x, _local12.y)] = 1;
}
_local13++;
}
var _local11 = new Array();
var _local15 = 0;
_local11[_local15] = _local9;
var _local7 = 1;
var _local8;
var _local6;
var _local2;
var _local3;
var _local16;
var _local5 = new Array();
var _local4 = new Array();
for (_local16 in map.table) {
_local4[_local16] = map.table[_local16];
}
while (_local15 != _local7) {
_local8 = _local11[_local15];
_local3 = _local8 - 1;
if (!_local4[_local3]) {
_local4[_local3] = _local8;
_local11[_local7] = _local3;
if (_local3 == _local14) {
_local5[0] = _local3;
_local6 = 1;
_local2 = _local3;
while (_local4[_local2] != _local9) {
_local2 = _local4[_local2];
_local5[_local6] = _local2;
_local6++;
}
_local5.reverse();
_local13 = 0;
while (_local13 < map.NMELIST.length) {
var _local12 = map.NMELIST[_local13].mc;
if (_local12 != mc) {
map.table[map.getPFI(_local12.x, _local12.y)] = 0;
}
_local13++;
}
return(_local5);
}
_local7++;
}
_local3 = _local8 + 1;
if (!_local4[_local3]) {
_local4[_local3] = _local8;
_local11[_local7] = _local3;
if (_local3 == _local14) {
_local5[0] = _local3;
_local6 = 1;
_local2 = _local3;
while (_local4[_local2] != _local9) {
_local2 = _local4[_local2];
_local5[_local6] = _local2;
_local6++;
}
_local5.reverse();
_local13 = 0;
while (_local13 < map.NMELIST.length) {
var _local12 = map.NMELIST[_local13].mc;
if (_local12 != mc) {
map.table[map.getPFI(_local12.x, _local12.y)] = 0;
}
_local13++;
}
return(_local5);
}
_local7++;
}
_local3 = _local8 + 100;
if (!_local4[_local3]) {
_local4[_local3] = _local8;
_local11[_local7] = _local3;
if (_local3 == _local14) {
_local5[0] = _local3;
_local6 = 1;
_local2 = _local3;
while (_local4[_local2] != _local9) {
_local2 = _local4[_local2];
_local5[_local6] = _local2;
_local6++;
}
_local5.reverse();
_local13 = 0;
while (_local13 < map.NMELIST.length) {
var _local12 = map.NMELIST[_local13].mc;
if (_local12 != mc) {
map.table[map.getPFI(_local12.x, _local12.y)] = 0;
}
_local13++;
}
return(_local5);
}
_local7++;
}
_local3 = _local8 - 100;
if (!_local4[_local3]) {
_local4[_local3] = _local8;
_local11[_local7] = _local3;
if (_local3 == _local14) {
_local5[0] = _local3;
_local6 = 1;
_local2 = _local3;
while (_local4[_local2] != _local9) {
_local2 = _local4[_local2];
_local5[_local6] = _local2;
_local6++;
}
_local5.reverse();
_local13 = 0;
while (_local13 < map.NMELIST.length) {
var _local12 = map.NMELIST[_local13].mc;
if (_local12 != mc) {
map.table[map.getPFI(_local12.x, _local12.y)] = 0;
}
_local13++;
}
return(_local5);
}
_local7++;
}
_local15++;
}
_local13 = 0;
while (_local13 < map.NMELIST.length) {
var _local12 = map.NMELIST[_local13].mc;
if (_local12 != mc) {
map.table[map.getPFI(_local12.x, _local12.y)] = 0;
}
_local13++;
}
if (noRecurse == undefined) {
var _local10;
_local13 = 0;
while (_local13 < map.OBJECTS.length) {
_local10 = map.OBJECTS[_local13];
if (_local10.pushable) {
map.table[map.getPFI(_local10.x, _local10.y)] = 0;
}
_local13++;
}
var _local17 = pathfinder(sx, sy, x, y, true);
_local13 = 0;
while (_local13 < map.OBJECTS.length) {
_local10 = map.OBJECTS[_local13];
if (_local10.pushable) {
map.table[map.getPFI(_local10.x, _local10.y)] = 1;
}
_local13++;
}
}
return(_local17);
}
function pathfindTo(endX, endY, fast, home, exclam, look) {
var _local8 = Math.round(tx);
var _local7 = Math.round(ty);
var _local14 = map.getPFI(_local8, _local7);
var _local9 = map.getPFI(endX, endY);
var _local10 = false;
if (map.table[_local9] == 1) {
map.table[_local9] = 0;
_local10 = true;
}
var _local5 = pathfinder(_local8, _local7, endX, endY);
if (_local10) {
map.table[_local9] = 1;
}
if (!_local5) {
return(false);
}
if (_local5.length >= MAXPATH) {
if (!home) {
return(false);
}
}
explodeDelay = 20;
clearPrimaryQueue();
if (!lured) {
previousX = _local8;
previousY = _local7;
previousDir = dir;
previousAngle = dir * 90;
}
lured = true;
px = endX;
py = endY;
if (fast) {
primaryCommand(9, 0);
} else {
primaryCommand(8, 0);
}
if (exclam) {
primaryCommand(6, 0);
}
if (look) {
primaryCommand(5, 0);
primaryCommand(2, (((Math.atan2(_local7 - endY, _local8 - endX) / Math.PI) * 180) + 270) % 360);
primaryCommand(1, 10);
}
var _local2;
var _local3 = map.getPFI(_local8, _local7);
var _local6 = _local5.length;
var _local4 = 0;
while (_local4 < _local6) {
_local2 = _local5[_local4];
if (_local2 == (_local3 - 100)) {
primaryCommand(0, 0);
} else if (_local2 == (_local3 + 100)) {
primaryCommand(0, 2);
} else if (_local2 == (_local3 - 1)) {
primaryCommand(0, 3);
} else if (_local2 == (_local3 + 1)) {
primaryCommand(0, 1);
}
_local3 = _local2;
_local4++;
}
if (home) {
primaryCommand(2, previousAngle);
primaryCommand(4, previousDir);
primaryCommand(11, 0);
} else {
primaryCommand(8, 0);
primaryCommand(1, 3);
primaryCommand(5, 0);
primaryCommand(7, 0);
primaryCommand(3, 5);
primaryCommand(1, 10);
primaryCommand(10);
}
return(true);
}
function footstep(index) {
map.soundController.playSoundPan(footsteps[map.FOOTSTEPINFO[Math.floor(mc.y)][Math.floor(mc.x)]][index - 1], mc._x, false);
}
var queue = 0;
var blockedCounter = 0;
var waitTimer = 0;
var PIOE = 565.486677646163;
var lookAroundCounter = 0;
var VISIONWIDTH = 60;
var ROTATESPEED = 15;
var PRECISION = 11;
var MAXDIST = 5;
var MAXPATH = 15;
var MAXHEAR = 5;
var deathCounter = 0;
var explodeDelay = 0;
var lured = false;
var alertTimer = 0;
var maxAlert = 15;
}
Symbol 1168 MovieClip [__Packages.FPSController] Frame 0
class FPSController
{
var MAP;
function FPSController (map) {
MAP = map;
}
function run() {
var _local5 = getTimer();
recentNumFrames++;
if (recentNumFrames == 10) {
var _local6 = (_local5 - recentStartTime) / 1000;
var _local4 = Math.round(recentNumFrames / _local6);
_root.f.fps1.gotoAndStop((_local4 % 10) + 1);
_root.f.fps2.gotoAndStop(Math.floor(_local4 / 10) + 1);
recentStartTime = _local5;
recentNumFrames = 0;
if (_global.autoSGM) {
if (_local4 < 10) {
if (lastFPS < 10) {
if (lastlastFPS < 10) {
if (_root.Game.SGM == false) {
_root.Game.switchTiles();
inform();
}
}
}
}
}
lastlastlastFPS = lastlastFPS;
lastlastFPS = lastFPS;
lastFPS = _local4;
}
}
function inform() {
MAP.paused = true;
MAP.PLAYER.mc.paused = true;
_root.attachMovie("popup", "popup", _root.getNextHighestDepth(), {lifetime:100, scriptCaller:undefined});
_root.popup.text = "Low framerate detected. Switching to simple graphics";
_root.onEnterFrame = function () {
_root.Game.fpsControl.run();
};
if (MAP.PLAYER.mc.stoppable) {
MAP.PLAYER.mc.stop();
}
for (var _local4 in MAP.NMELIST) {
var _local4 = MAP.NMELIST[_local4].mc;
if (_local4.stoppable) {
_local4.stop();
}
}
_root.menuButton._visible = false;
var _local3 = new flash.filters.BlurFilter();
_local3.quality = 3;
_local3.blurX = random(5) + 5;
_local3.blurY = random(5) + 5;
_root.bg.filters = [_local3];
_quality = "BEST";
}
var recentNumFrames = 0;
var recentStartTime = getTimer();
var lastFPS = 20;
var lastlastFPS = 20;
var lastlastlastFPS = 20;
}
Symbol 1169 MovieClip [__Packages.MiniMapController] Frame 0
class MiniMapController
{
var C4count, map, depth, mc, waypoint;
function MiniMapController (themap) {
C4count = 0;
map = themap;
depth = 0;
mc = _root.miniMap;
mc.playerBlip.swapDepths(10000);
mc.playerBlip.cacheAsBitmap = true;
var _local4 = 0;
while (_local4 < map.HITINFO.length) {
var _local3 = 0;
while (_local3 < map.HITINFO[_local4].length) {
if (((map.HITINFO[_local4][_local3] == true) && (map.MAPINFO[_local4][_local3] != 22)) && (map.MAPINFO[_local4][_local3] != undefined)) {
mc.walls.attachMovie("miniMapWall", (("wall" + _local3) + "x") + _local4, (1000 + (_local4 * 500)) + _local3, {_x:_local3 * 5, _y:_local4 * 5, cacheAsBitmap:true});
}
_local3++;
}
_local4++;
}
mc.walls.cacheAsBitmap = true;
}
function addEnemy(nmeMC) {
nmeList.push(mc.nme.attachMovie("nmeBlip", "nmeBlip" + depth, depth + 50000, {ref:nmeMC}));
nmeList[nmeList.length - 1].blip.cacheAsBitmap = true;
depth++;
}
function addExitBlip(x, y) {
mc.walls.attachMovie("exitBlip", "exitBlip", 49999, {_x:x * 5, _y:y * 5, cacheAsBitmap:true});
waypoint = [x * 5, y * 5];
}
function addC4blip(x, y) {
mc.walls.attachMovie("C4Blip", (("C4Blip" + x) + "_") + y, 49998 - C4count, {_x:x * 5, _y:y * 5, cacheAsBitmap:true});
C4count++;
if (C4count == 100) {
C4count = 0;
}
}
function removeC4blip(x, y) {
mc.walls[(("C4Blip" + x) + "_") + y].removeMovieClip();
}
function removeEnemy(nmeMC) {
var _local2 = 0;
while (_local2 < nmeList.length) {
if (nmeList[_local2].ref == nmeMC) {
nmeList[_local2].removeMovieClip();
nmeList.splice(_local2, 1);
break;
}
_local2++;
}
}
function killEnemy(nmeMC) {
var _local2;
var _local4 = 0;
for (_local2 in nmeList) {
if (nmeList[_local2].ref == nmeMC) {
nmeList[_local2].gotoAndStop(2);
break;
}
}
}
function run() {
var _local4;
var _local2;
for (_local4 in nmeList) {
_local2 = nmeList[_local4];
var _local3 = _local2.ref.ref;
var _local5 = map.PLAYER.mc;
_local2._x = ((_local2.ref.x - map.mapx) + 7) * 5;
_local2._y = ((_local2.ref.y - map.mapy) + 7) * 5;
_local2._rotation = _local3.angle;
if (_local3.alertTimer > 0) {
_local2.gotoAndStop(3);
} else {
_local2.gotoAndStop(1);
}
}
mc.walls._x = (7 - map.mapx) * 5;
mc.walls._y = (7 - map.mapy) * 5;
if (waypoint != undefined) {
mc.draw.clear();
mc.draw.lineStyle(1, 16711680, 100);
mc.draw.moveTo(50, 50);
mc.draw.lineTo(waypoint[0] + mc.walls._x, waypoint[1] + mc.walls._y);
}
}
var nmeList = new Array();
}
Symbol 1170 MovieClip [__Packages.SoundController] Frame 0
class SoundController
{
var map, SOUNDS;
function SoundController (theMap) {
map = theMap;
SOUNDS = new Object();
_root.createEmptyMovieClip("SFX", _root.getNextHighestDepth());
var _local6 = new Array(["explode", 60], ["footstep1", 100], ["footstep2", 100], ["groan", 100], ["necksnap", 100], ["fall", 100], ["c4click", 100], ["walltap", 100], ["bgMusic1", 90], ["bgMusic2", 90], ["bgMusic3", 90], ["switch", 100], ["switch", 100], ["metalFootstep1", 100], ["metalFootstep2", 100], ["grassFootstep1", 100], ["grassFootstep2", 100], ["error", 100], ["gas", 100]);
var _local5 = 0;
while (_local5 < map.particleSounds.length) {
var _local3 = 0;
while (_local3 < map.particleSounds[_local5].length) {
var _local4 = map.particleSounds[_local5][_local3];
SOUNDS[_local4] = new Sound(_root.SFX.createEmptyMovieClip(_local4, _root.SFX.getNextHighestDepth()));
SOUNDS[_local4].setVolume(100);
SOUNDS[_local4].attachSound(_local4);
_local3++;
}
_local5++;
}
_local5 = 0;
while (_local5 < _local6.length) {
var _local4 = _local6[_local5][0];
SOUNDS[_local4] = new Sound(_root.SFX.createEmptyMovieClip(_local4, _root.SFX.getNextHighestDepth()));
SOUNDS[_local4].setVolume(_local6[_local5][1]);
SOUNDS[_local4].attachSound(_local4);
_local5++;
}
}
function playSoundPan(soundName, x, stop) {
var _local2 = SOUNDS[soundName];
if (stop) {
_local2.stop();
}
if (x < 0) {
x = 0;
} else if (x > 640) {
x = 640;
}
_local2.setPan(Math.round((x - 320) / 3.2));
_local2.start();
}
function playSound(soundName, stop) {
var _local2 = SOUNDS[soundName];
if (stop) {
_local2.stop();
}
_local2.setPan(0);
_local2.start();
}
function playMusic(musicName) {
SOUNDS.bgMusic1.stop();
SOUNDS.bgMusic2.stop();
SOUNDS.bgMusic3.stop();
SOUNDS[musicName].start(0, 32768);
}
}
Symbol 1171 MovieClip [__Packages.ParticleController] Frame 0
class ParticleController
{
var map, soundController, PARTICLES;
function ParticleController (theMap) {
map = theMap;
soundController = map.soundController;
PARTICLES = new Array();
}
function run() {
var _local2;
for (_local2 in PARTICLES) {
_local2 = PARTICLES[_local2];
if (hitTest(_local2.x + _local2.vx, _local2.y, _local2.z)) {
_local2.vx = _local2.vx * -0.5;
if (random(2) == 0) {
_local2.vrot = _local2.vrot * -0.9;
}
if (Math.abs(_local2.vx) > 0.5) {
bounceNoise(_local2.sound, _local2._x);
}
} else {
_local2.x = _local2.x + _local2.vx;
}
if (hitTest(_local2.x, _local2.y + _local2.vy, _local2.z)) {
_local2.vy = _local2.vy * -0.5;
_local2.y = _local2.y + _local2.vy;
if (random(2) == 0) {
_local2.vrot = _local2.vrot * -0.9;
}
if (Math.abs(_local2.vy) > 0.5) {
bounceNoise(_local2.sound, _local2._x);
}
} else {
_local2.y = _local2.y + _local2.vy;
}
_local2.vz = _local2.vz - 0.446;
_local2.z = _local2.z + _local2.vz;
var _local3 = map.HEIGHTINFO[Math.floor(_local2.y + 0.5)][Math.floor(_local2.x + 0.5)];
if (_local2.z < _local3) {
_local2.vz = _local2.vz * -0.8;
_local2.vx = _local2.vx * 0.5;
_local2.vy = _local2.vy * 0.5;
if (random(2) == 0) {
_local2.vrot = _local2.vrot * -0.9;
}
_local2.z = _local3 + 0.01;
if (_local2.vz > 0.5) {
bounceNoise(_local2.sound, _local2._x);
}
}
if ((((_local2.vx > -0.001) && (_local2.vx < 0.001)) && (_local2.vy > -0.001)) && (_local2.vy < 0.001)) {
removeParticle(_local2);
}
if (_local2.z > (_local3 + 0.01)) {
_local2._rotation = _local2._rotation + _local2.vrot;
}
_local2.shad.x = _local2.x;
_local2.shad.y = _local2.y;
_local2.shad.z = _local3;
_local2.lifetime++;
if (_local2.lifetime > 50) {
removeParticle(_local2);
}
}
}
function bounceNoise(type, x) {
var _local2 = map.particleSounds[type][random(map.particleSounds[type].length)];
soundController.playSoundPan(_local2, x, true);
}
function hitTest(tx, ty, tz) {
if (map.HEIGHTINFO[Math.floor(ty + 0.5)][Math.floor(tx + 0.5)] < tz) {
return(false);
}
return(true);
}
function addParticle(x, y, z, vx, vy, vz, pic, vrot, soundIndex) {
if (_global.particles) {
particleCycler();
var _local4;
_root.bg["shadow" + particleCount].removeMovieClip();
var _local5 = _root.bg.attachMovie("particleShadow", "shadow" + particleCount, _root.bg.getNextHighestDepth(), {x:x, y:y, z:map.HEIGHTINFO[Math.floor(y)][Math.floor(x)], depthbonus:-8});
map.addScrollable(_local5);
_root.bg["particle" + particleCount].removeMovieClip();
_local4 = _root.bg.attachMovie(pic, "particle" + particleCount, _root.bg.getNextHighestDepth(), {x:x, y:y, z:z, vx:vx, vy:vy, vz:vz, shad:_local5, depthbonus:-7, lifetime:0, vrot:vrot, sound:soundIndex});
_local5._width = _local4._width;
_local5.cacheAsBitmap = true;
if (vrot == 0) {
_local4.cacheAsBitmap = true;
}
PARTICLES.push(_local4);
map.addScrollable(_local4);
}
}
function removeParticle(mc) {
var _local2 = 0;
while (_local2 < PARTICLES.length) {
if (PARTICLES[_local2] == mc) {
map.removeScrollable(mc);
map.removeScrollable(mc.shad);
PARTICLES.splice(_local2, 1);
mc.shad.removeMovieClip();
mc.removeMovieClip();
break;
}
_local2++;
}
}
function particleCycler() {
particleCount++;
if (particleCount > 1000) {
particleCount = 0;
}
return(particleCount);
}
function free() {
PARTICLES.splice(0, PARTICLES.length);
}
var particleCount = 0;
}
Symbol 1124 MovieClip Frame 2
stop();
Symbol 1124 MovieClip Frame 9
if (_global.rootFrame != undefined) {
_global.menuFunc();
delete _global.menuFunc;
var f = _global.rootFrame;
delete _global.rootFrame;
_root.gotoAndStop(f);
} else {
_global.menuFunc();
delete _global.menuFunc;
_root.menu.gotoAndStop(_global.menuFrame);
}
Instance of Symbol 802 MovieClip in Symbol 1124 MovieClip Frame 9
/* no clip actions */
Symbol 1134 Button
on (release) {
playButtonFunc();
}
on (rollOver) {
KBF.setMouseFocus("playButton");
}
Symbol 1149 Button
on (release) {
playButtonFunc();
}
on (rollOver) {
KBF.setMouseFocus("playButton");
}
Symbol 1155 MovieClip Frame 1
function transfer(frame, func) {
_global.menuFrame = frame;
_global.menuFunc = func;
_root.wiper.gotoAndPlay("hide");
}
function rootTransfer(frame, func) {
_global.rootFrame = frame;
_global.menuFrame = "root";
_global.menuFunc = func;
_root.wiper.gotoAndPlay("hide");
}
function playButtonFunc() {
if (_root.SOvarExists("PlayedBefore")) {
if (_root.SOgetVar("Level") == 0) {
transfer("main", function () {
_global.currentLevel = 0;
_root.gotoAndStop("game");
});
} else {
transfer("mission", function () {
var _local5 = _root.SOgetVar("Level");
var _local6 = 0;
if (_local5 > 9) {
_local6 = _local5 - 9;
}
maxLevels = _local5;
levelIndex = _local6;
var _local3 = _local6;
while (_local3 < _local5) {
var _local4 = attachMovie("levelBar", "level" + (_local3 - _local6), _local3, {missionName:"Mission " + (_local3 + 1), _y:(_local3 - _local6) * 25, levelInfo:_global.levels, levelIndex:_local3});
if (_local3 < _local5) {
_local4.gotoAndStop(2);
}
if (_local3 == _local5) {
_local4.gotoAndStop(2);
}
_local3++;
}
});
}
} else {
_root.SOsetVar("PlayedBefore", true);
_root.SOsetVar("Level", 0);
transfer("basicTrain");
}
}
function optionsButtonFunc() {
transfer("options");
}
function trainingButtonFunc() {
transfer("training");
}
if (_global.menuFrame != undefined) {
gotoAndStop(_global.menuFrame);
delete _global.menuFrame;
} else {
stop();
}
Instance of Symbol 831 MovieClip "KBF" in Symbol 1155 MovieClip Frame 1
onClipEvent (load) {
focusList = new Array(["playButton", 2, "", 1, ""], ["optionsButton", 0, "", 2, ""]);
currentFocus = _global.mainFocus;
currentMC = _parent[focusList[currentFocus][0]];
changeFocus = function (dir) {
var _local3 = focusList[currentFocus][dir];
if (_local3 != "") {
currentMC._alpha = 100;
var _local2 = new Sound(currentMC);
_local2.attachSound("UIbuttonHover");
_local2.start();
currentFocus = _local3;
currentMC = _parent[focusList[currentFocus][0]];
}
};
setMouseFocus = function (clipName) {
currentMC._alpha = 100;
currentMC.gotoAndStop(1);
currentMC = _parent[clipName];
var _local2 = 0;
while (_local2 < focusList.length) {
if (focusList[_local2][0] == clipName) {
currentFocus = _local2;
break;
}
_local2++;
}
};
timer = 0;
}
onClipEvent (enterFrame) {
currentMC._alpha = 60 + (Math.sin(timer / 2) * 20);
timer++;
}
on (keyPress "<Up>") {
changeFocus(1);
}
on (keyPress "<Right>") {
changeFocus(2);
}
on (keyPress "<Down>") {
changeFocus(3);
}
on (keyPress "<Left>") {
changeFocus(4);
}
on (keyPress "<Space>") {
var s = new Sound(currentMC);
s.attachSound("UIbuttonPress");
s.start();
_global.mainFocus = currentFocus;
_parent[currentMC._name + "Func"]();
}
Symbol 1155 MovieClip Frame 2
function refreshOptions() {
if (_global.FPS) {
FPSindic._x = FPSON._x;
FPSindic._y = FPSON._y;
} else {
FPSindic._x = FPSOFF._x;
FPSindic._y = FPSOFF._y;
}
if (_global.SGM) {
SGMindic._x = SGMON._x;
SGMindic._y = SGMON._y;
} else {
SGMindic._x = SGMOFF._x;
SGMindic._y = SGMOFF._y;
}
if (_global.autoSGM) {
autoSGMindic._x = AUTOSGMON._x;
autoSGMindic._y = AUTOSGMON._y;
} else {
autoSGMindic._x = AUTOSGMOFF._x;
autoSGMindic._y = AUTOSGMOFF._y;
}
if (_global.music) {
musicindic._x = musicON._x;
musicindic._y = musicON._y;
} else {
musicindic._x = musicOFF._x;
musicindic._y = musicOFF._y;
}
if (_global.SFX) {
SFXindic._x = SFXON._x;
SFXindic._y = SFXON._y;
} else {
SFXindic._x = SFXOFF._x;
SFXindic._y = SFXOFF._y;
}
if (_global.particles) {
PARTindic._x = PARTON._x;
PARTindic._y = PARTON._y;
} else {
PARTindic._x = PARTOFF._x;
PARTindic._y = PARTOFF._y;
}
}
function backButtonFunc() {
transfer("main");
}
function SFXONFunc() {
_global.SFX = true;
var _local2 = new Sound();
_local2.setVolume(100);
refreshOptions();
}
function SFXOFFFunc() {
_global.SFX = false;
var _local2 = new Sound();
_local2.setVolume(0);
refreshOptions();
}
function PARTONFunc() {
_global.particles = true;
refreshOptions();
}
function PARTOFFFunc() {
_global.particles = false;
refreshOptions();
}
function AUTOSGMONFunc() {
_global.autoSGM = true;
refreshOptions();
}
function AUTOSGMOFFFunc() {
_global.autoSGM = false;
refreshOptions();
}
function SGMONFunc() {
_global.SGM = true;
refreshOptions();
}
function SGMOFFFunc() {
_global.SGM = false;
refreshOptions();
}
function FPSONFunc() {
_global.FPS = true;
refreshOptions();
}
function FPSOFFFunc() {
_global.FPS = false;
refreshOptions();
}
refreshOptions();
Instance of Symbol 831 MovieClip "KBF" in Symbol 1155 MovieClip Frame 2
onClipEvent (load) {
focusList = new Array(["backButton", 1, 1, "", ""], ["SFXON", 3, 2, 0, ""], ["SFXOFF", 4, "", 0, 1], ["PARTON", 5, 4, 1, ""], ["PARTOFF", 6, "", 2, 3], ["AUTOSGMON", 7, 6, 3, ""], ["AUTOSGMOFF", 8, "", 4, 5], ["SGMON", 9, 8, 5, ""], ["SGMOFF", 10, "", 6, 7], ["FPSON", "", 10, 7, ""], ["FPSOFF", "", "", 8, 9]);
currentFocus = 0;
currentMC = _parent[focusList[currentFocus][0]];
changeFocus = function (dir) {
var _local3 = focusList[currentFocus][dir];
if (_local3 != "") {
currentMC._alpha = 100;
var _local2 = new Sound(currentMC);
_local2.attachSound("UIbuttonHover");
_local2.start();
currentFocus = _local3;
currentMC = _parent[focusList[currentFocus][0]];
}
};
setMouseFocus = function (clipName) {
currentMC._alpha = 100;
currentMC.gotoAndStop(1);
currentMC = _parent[clipName];
var _local2 = 0;
while (_local2 < focusList.length) {
if (focusList[_local2][0] == clipName) {
currentFocus = _local2;
break;
}
_local2++;
}
};
timer = 0;
}
onClipEvent (enterFrame) {
currentMC._alpha = 60 + (Math.sin(timer / 2) * 20);
timer++;
}
on (keyPress "<Up>") {
changeFocus(1);
}
on (keyPress "<Right>") {
changeFocus(2);
}
on (keyPress "<Down>") {
changeFocus(3);
}
on (keyPress "<Left>") {
changeFocus(4);
}
on (keyPress "<Space>") {
var s = new Sound(currentMC);
s.attachSound("UIbuttonPress");
s.start();
_parent[currentMC._name + "Func"]();
}
Symbol 1155 MovieClip Frame 3
function nextButtonFunc() {
if (instructions._currentframe < instructions._totalframes) {
instructions.nextFrame();
prevButton.enabled = true;
prevButton._alpha = 100;
if (instructions._currentframe == instructions._totalframes) {
nextButton._alpha = 40;
nextButton.enabled = false;
}
}
}
function prevButtonFunc() {
if (instructions._currentframe > 1) {
instructions.prevFrame();
nextButton.enabled = true;
nextButton._alpha = 100;
if (instructions._currentframe == 1) {
prevButton._alpha = 40;
prevButton.enabled = false;
}
}
}
function backButtonFunc() {
transfer("main");
}
instructions.gotoAndStop(1);
prevButton.enabled = false;
prevButton._alpha = 40;
nextButton.enabled = true;
nextButton._alpha = 100;
Instance of Symbol 831 MovieClip "KBF" in Symbol 1155 MovieClip Frame 3
onClipEvent (load) {
focusList = new Array(["backButton", 1, 1, "", ""], ["prevButton", 2, 2, 0, 0], ["nextButton", "", "", 0, 1]);
currentFocus = 0;
currentMC = _parent[focusList[currentFocus][0]];
changeFocus = function (dir) {
var _local3 = focusList[currentFocus][dir];
if (_local3 != "") {
currentMC._alpha = 100;
var _local2 = new Sound(currentMC);
_local2.attachSound("UIbuttonHover");
_local2.start();
currentFocus = _local3;
currentMC = _parent[focusList[currentFocus][0]];
}
};
setMouseFocus = function (clipName) {
currentMC._alpha = 100;
currentMC.gotoAndStop(1);
currentMC = _parent[clipName];
var _local2 = 0;
while (_local2 < focusList.length) {
if (focusList[_local2][0] == clipName) {
currentFocus = _local2;
break;
}
_local2++;
}
};
timer = 0;
}
onClipEvent (enterFrame) {
currentMC._alpha = 60 + (Math.sin(timer / 2) * 20);
timer++;
}
on (keyPress "<Up>") {
changeFocus(1);
}
on (keyPress "<Right>") {
changeFocus(2);
}
on (keyPress "<Down>") {
changeFocus(3);
}
on (keyPress "<Left>") {
changeFocus(4);
}
on (keyPress "<Space>") {
var s = new Sound(currentMC);
s.attachSound("UIbuttonPress");
s.start();
_parent[currentMC._name + "Func"]();
}
Symbol 1155 MovieClip Frame 4
function playButtonFunc() {
transfer("main", function () {
_global.level = _global.levels[0];
_global.currentLevel = 0;
_root.gotoAndStop("game");
});
}
function trainingButtonFunc() {
transfer("training");
}
Instance of Symbol 919 MovieClip in Symbol 1155 MovieClip Frame 4
onClipEvent (load) {
label = "Z";
}
Instance of Symbol 919 MovieClip in Symbol 1155 MovieClip Frame 4
onClipEvent (load) {
label = "X";
}
Instance of Symbol 919 MovieClip in Symbol 1155 MovieClip Frame 4
onClipEvent (load) {
label = "M";
}
Instance of Symbol 919 MovieClip in Symbol 1155 MovieClip Frame 4
onClipEvent (load) {
label = "R";
}
Instance of Symbol 831 MovieClip "KBF" in Symbol 1155 MovieClip Frame 4
onClipEvent (load) {
focusList = new Array(["playButton", "", "", "", 1]);
currentFocus = 0;
currentMC = _parent[focusList[currentFocus][0]];
changeFocus = function (dir) {
var _local3 = focusList[currentFocus][dir];
if (_local3 != "") {
currentMC._alpha = 100;
var _local2 = new Sound(currentMC);
_local2.attachSound("UIbuttonHover");
_local2.start();
currentFocus = _local3;
currentMC = _parent[focusList[currentFocus][0]];
}
};
setMouseFocus = function (clipName) {
currentMC._alpha = 100;
currentMC.gotoAndStop(1);
currentMC = _parent[clipName];
var _local2 = 0;
while (_local2 < focusList.length) {
if (focusList[_local2][0] == clipName) {
currentFocus = _local2;
break;
}
_local2++;
}
};
timer = 0;
}
onClipEvent (enterFrame) {
currentMC._alpha = 60 + (Math.sin(timer / 2) * 20);
timer++;
}
on (keyPress "<Up>") {
changeFocus(1);
}
on (keyPress "<Right>") {
changeFocus(2);
}
on (keyPress "<Down>") {
changeFocus(3);
}
on (keyPress "<Left>") {
changeFocus(4);
}
on (keyPress "<Space>") {
var s = new Sound(currentMC);
s.attachSound("UIbuttonPress");
s.start();
_parent[currentMC._name + "Func"]();
}
Symbol 1155 MovieClip Frame 5
function update() {
var h = 10;
if (maxLevels < 10) {
h = maxLevels + 1;
}
var i = 0;
while (i < h) {
eval ("level" + i).removeMovieClip();
var obj = attachMovie("levelBar", "level" + i, i, {missionName:"Mission " + ((i + 1) + levelIndex), _y:i * 25, levelInfo:_global.levels, levelIndex:i + levelIndex});
obj.onRelease = function () {
levelFunc(this.levelIndex);
};
obj.onRollOver = function () {
KBF.setMouseFocus(this._name);
};
if ((i + levelIndex) < maxLevels) {
obj.gotoAndStop(2);
}
if ((i + levelIndex) == maxLevels) {
obj.gotoAndStop(2);
}
i++;
}
}
function levelFunc(level) {
Mouse.removeListener(_global.mList);
_global.level = _global.levels[level];
_global.currentLevel = level;
rootTransfer("game", function () {
});
}
function backButtonFunc() {
transfer("main", function () {
var i = 0;
while (i <= _root.SOgetVar("Level")) {
eval ("level" + i).removeMovieClip();
i++;
}
});
Mouse.removeListener(_global.mList);
}
function upScrollFunc() {
if (levelIndex > 0) {
levelIndex--;
update();
}
}
function downScrollFunc() {
if (levelIndex < (maxLevels - 9)) {
levelIndex++;
update();
}
}
update();
upScroll.func.onRelease = function () {
upScrollFunc();
};
upScroll.func.onRollOver = function () {
KBF.setMouseFocus("upScroll");
};
downScroll.func.onRelease = function () {
downScrollFunc();
};
downScroll.func.onRollOver = function () {
KBF.setMouseFocus("downScroll");
};
_global.mList = new Object();
_global.mList.onMouseWheel = function (delta) {
if (delta < 0) {
if (levelIndex < (maxLevels - 9)) {
levelIndex++;
update();
}
} else if (levelIndex > 0) {
levelIndex--;
update();
}
};
Mouse.addListener(_global.mList);
Instance of Symbol 831 MovieClip "KBF" in Symbol 1155 MovieClip Frame 5
onClipEvent (load) {
var i = 0;
focusList = new Array(["upScroll", "", "", i + 1, ""]);
i++;
var j = 0;
while (j < 10) {
if (_parent["level" + j] != undefined) {
focusList.push(["level" + j, i - 1, "", i + 1, ""]);
i++;
if (_parent["level" + (j + 1)] == undefined) {
currentFocus = i - 1;
currentMC = _parent["level" + j];
}
}
j++;
}
focusList.push(["downScroll", i - 1, "", i + 1, ""]);
i++;
focusList.push(["backButton", i - 1, "", "", ""]);
changeFocus = function (dir) {
var _local3 = focusList[currentFocus][dir];
if (_local3 != "") {
currentMC._alpha = 100;
var _local2 = new Sound(currentMC);
_local2.attachSound("UIbuttonHover");
_local2.start();
currentFocus = _local3;
currentMC = _parent[focusList[currentFocus][0]];
}
};
setMouseFocus = function (clipName) {
currentMC._alpha = 100;
currentMC = _parent[clipName];
var _local2 = 0;
while (_local2 < focusList.length) {
if (focusList[_local2][0] == clipName) {
currentFocus = _local2;
break;
}
_local2++;
}
};
timer = 0;
}
onClipEvent (enterFrame) {
currentMC._alpha = 60 + (Math.sin(timer / 2) * 20);
timer++;
}
on (keyPress "<Up>") {
changeFocus(1);
}
on (keyPress "<Right>") {
changeFocus(2);
}
on (keyPress "<Down>") {
changeFocus(3);
}
on (keyPress "<Left>") {
changeFocus(4);
}
on (keyPress "<Space>") {
var s = new Sound(currentMC);
s.attachSound("UIbuttonPress");
s.start();
if (currentMC._name.substring(0, 5) == "level") {
_parent.levelFunc(currentMC.levelIndex);
} else {
_parent[currentMC._name + "Func"]();
}
}
Symbol 1160 Button
on (release) {
_root.Game.openMenu();
}