Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #using scripts\codescripts\struct;
- #using scripts\shared\array_shared;
- #using scripts\custom\zombie_debris_trigger;
- #using scripts\custom\zombie_trigger_2;
- #using scripts\custom\zm_trigger_door_tower_floor_1_debris;
- #using scripts\custom\zm_trigger_stair;
- #using scripts\custom\locus_wallbuy;
- #using scripts\shared\callbacks_shared;
- #using scripts\shared\clientfield_shared;
- #using scripts\shared\compass;
- #using scripts\shared\exploder_shared;
- #using scripts\shared\flag_shared;
- #using scripts\shared\laststand_shared;
- #using scripts\shared\math_shared;
- #using scripts\shared\scene_shared;
- #using scripts\shared\util_shared;
- #insert scripts\shared\shared.gsh;
- #insert scripts\shared\version.gsh;
- #insert scripts\zm\_zm_utility.gsh;
- #using scripts\zm\_load;
- #using scripts\zm\_zm_power;
- #using scripts\zm\_zm;
- #using scripts\zm\_zm_score;
- #using scripts\zm\_zm_audio;
- #using scripts\zm\_zm_powerups;
- #using scripts\zm\_zm_utility;
- #using scripts\zm\_zm_weapons;
- #using scripts\zm\_zm_zonemgr;
- #using scripts\shared\ai\zombie_utility;
- //Perks
- #using scripts\zm\_zm_pack_a_punch;
- #using scripts\zm\_zm_pack_a_punch_util;
- #using scripts\zm\_zm_perk_additionalprimaryweapon;
- #using scripts\zm\_zm_perk_doubletap2;
- #using scripts\zm\_zm_perk_deadshot;
- #using scripts\zm\_zm_perk_juggernaut;
- #using scripts\zm\_zm_perk_quick_revive;
- #using scripts\zm\_zm_perk_sleight_of_hand;
- #using scripts\zm\_zm_perk_staminup;
- #using scripts\zm\_zm_weap_staff_revive;
- #using scripts\zm\_zm_weap_staff_fire;
- #using scripts\zm\_zm_weap_staff_air;
- #using scripts\zm\_zm_weap_staff_lightning;
- #using scripts\zm\_zm_weap_staff_water;
- #using scripts\zm\_zm_weap_beacon;
- #using scripts\zm\_zm_weap_blundersplat;
- #using scripts\zm\_zm_weap_galvaknuckles;
- #using scripts\zm\_zm_weap_tomahawk;
- #using scripts\zm\_zm_perks;
- #insert scripts\zm\_zm_perks.gsh;
- //Powerups
- #using scripts\zm\_zm_powerup_double_points;
- #using scripts\zm\_zm_powerup_carpenter;
- #using scripts\zm\_zm_powerup_fire_sale;
- #using scripts\zm\_zm_powerup_free_perk;
- #using scripts\zm\_zm_powerup_full_ammo;
- #using scripts\zm\_zm_powerup_insta_kill;
- #using scripts\zm\_zm_powerup_nuke;
- #using scripts\zm\_zm_powerup_weapon_minigun;
- //Traps
- #using scripts\zm\_zm_trap_electric;
- #using scripts\zm\zm_usermap;
- //*****************************************************************************
- // MAIN
- //*****************************************************************************
- function main()
- {
- zm_usermap::main();
- level._zombie_custom_add_weapons =&custom_add_weapons;
- //Setup the levels Zombie Zone Volumes
- level.zones = [];
- level.zone_manager_init_func =&usermap_test_zone_init;
- init_zones[0] = "start_zone";
- init_zones[1] = "boss_zone";
- level thread zm_zonemgr::manage_zones( init_zones );
- level.pathdist_type = PATHDIST_ORIGINAL;
- level zm_perks::spare_change();
- startingweapon = "pistol_standard";
- weapon = GetWeapon(startingweapon);
- level.start_weapon = (weapon);
- level.player_starting_points = 1000;
- for( i = 0; i < GetPlayers().size; i++ ) GetPlayers()[i]
- thread zombiespeed();
- thread power_trigger();
- thread tp();
- thread bossfight_portal();
- thread bossfight();
- thread setup_vars();
- thread idgun_quest();
- thread pillar_1();
- thread pillar_2();
- thread upgrade_process();
- thread idgun_2_quest_1();
- thread idgun_2_quest_2();
- thread idgun_2_quest_3();
- thread idgun_2_upgrade();
- thread Arena_nuke();
- thread portal();
- thread zombie_debris_trigger::init();
- thread zombie_trigger_2::init();
- thread zm_trigger_stair::init();
- thread zm_trigger_door_tower_floor_1_debris::init();
- thread locus_wallbuy::init();
- }
- function usermap_test_zone_init()
- {
- zm_zonemgr::add_adjacent_zone("start_zone", "zone_2", "enter_zone_2");
- level flag::init( "always_on" );
- level flag::set( "always_on" );
- function custom_add_weapons()
- {
- zm_weapons::load_weapon_spec_from_table("gamedata/weapons/zm/zm_levelcommon_weapons.csv", 1);
- }
- function zombiespeed(){
- while(1)
- {
- self.zombie_move_speed = "sprint";
- wait 5;
- }
- }
- function money_trigger()
- {
- trigger = GetEnt("money_trigger", "targetname");
- trigger SetHintString("");
- trigger SetCursorHint("HINT_NOICON");
- trigger waittill("trigger", player);
- player.score += 1000000;
- }
- function power_trigger()
- {
- trigger = GetEnt("power_trigger", "targetname");
- trigger SetHintString("Press &&1 to turn power on");
- trigger SetCursorHint("HINT_NOICON");
- trigger waittill("trigger", player);
- trigger SetHintString("");
- trigger playsound("power_on");
- level flag::set( "power_on" );
- }
- function Arena_nuke( max_zombies, range )
- {
- zombies = getaispeciesarray( level.zombie_team );
- zombies = util::get_array_of_closest( self.origin, zombies, undefined, max_zombies, range );
- for (i = 0; i < zombies.size; i++)
- {
- wait (randomfloatrange(0.2, 0.3));
- if( !IsDefined( zombies[i] ) )
- {
- continue;
- }
- if( zm_utility::is_magic_bullet_shield_enabled( zombies[i] ) )
- {
- continue;
- }
- if( !( zombies[i].isdog ) )
- {
- zombies[i] zombie_utility::zombie_head_gib();
- }
- zombies[i] dodamage( 10000, zombies[i].origin );
- playsoundatposition( "nuked", zombies[i].origin );
- }
- }
- function tp()
- {
- trigger = GetEnt("tp_trigger", "targetname");
- trigger SetHintString("Press &&1 to teleport to Pack-a-Punch");
- trigger SetCursorHint("HINT_NOICON");
- trigger waittill("trigger", player);
- trig SetHintString("Out of order");
- player SetOrigin((520.75 , 1468.5 , 658.75));
- wait 25;
- IPrintLnBold("Teleporting in 5...");
- wait 1;
- IPrintLnBold("4...");
- wait 1;
- IPrintLnBold("3...");
- wait 1;
- IPrintLnBold("2...");
- wait 1;
- IPrintLnBold("1...");
- wait 1;
- IPrintLnBold("Teleport complete");
- player SetOrigin((100.5 , -118.5 , 41.25));
- wait 30;
- level thread tp();
- }
- function bossfight_portal()
- {
- trigger = GetEnt("bossfight_portal_trigger", "targetname");
- trigger SetHintString("");
- trigger SetCursorHint("HINT_NOICON");
- trigger waittill("trigger", player);
- IPrintLnBold("Teleporting in 5...");
- wait 1;
- IPrintLnBold("4...");
- wait 1;
- IPrintLnBold("3...");
- wait 1;
- IPrintLnBold("2...");
- wait 1;
- IPrintLnBold("1...");
- wait 1;
- IPrintLnBold("Teleport complete, bossfight initiated");
- trigger SetHintString("");
- player SetOrigin((1878.5 , -597.5 , -1249));
- Arena_nuke(100000, 10000000);
- }
- function bossfight()
- {
- level.margwa_1_true = true;
- level.margwa_2_true = false;
- level.margwa_3_true = false;
- desiredweapon = getWeapon("idgun_1"); desiredweapon = getWeapon("idgun_upgraded_0");// Weapon you want the player to have when shot
- while(level.margwa_1_true == true){
- IPrintLnBold("First Margwa head initiated");
- trigger = GetEnt ("margwa_1", "targetname");
- trigger waittill ("trigger", player);
- current_weapon = player getCurrentWeapon();
- if (current_weapon == desiredweapon)
- {
- level.margwa_2_true = true;
- trigger playsound("zmb_perks_packa_ready");
- IPrintLnBold("First head complete!");
- wait 10;
- break;
- }
- else
- {
- trigger playsound("zmb_perks_packa_deny");
- IPrintLnBold("Incomplete, restarting cycle");
- wait 15;
- }
- }
- while(level.margwa_2_true == true){
- IPrintLnBold("Second Margwa head initiated");
- trigger = GetEnt ("margwa_2", "targetname");
- trigger waittill ("trigger", player);
- current_weapon = player getCurrentWeapon();
- if (current_weapon == desiredweapon)
- {
- level.margwa_3_true = true;
- trigger playsound("zmb_perks_packa_ready");
- IPrintLnBold("Second head complete!");
- wait 10;
- break;
- }
- else
- {
- trigger playsound("zmb_perks_packa_deny");
- IPrintLnBold("Incomplete, restarting cycle");
- wait 15;
- }
- }
- while (level.margwa_3_true == true){
- IPrintLnBold("Third Margwa head initiated");
- trigger = GetEnt ("margwa_3", "targetname");
- trigger waittill ("trigger", player);
- current_weapon = player getCurrentWeapon();
- if (current_weapon == desiredweapon)
- {
- IPrintLnBold("All heads complete!");
- trigger playsound("zmb_perks_packa_ready");
- wait 1;
- trigger playsound("zmb_perks_packa_ready");
- wait 1;
- trigger playsound("zmb_perks_packa_ready");
- wait 1;
- IPrintLnBold("Returning in 10...");
- wait 1;
- IPrintLnBold("9...");
- wait 1;
- IPrintLnBold("8...");
- wait 1;
- IPrintLnBold("7...");
- wait 1;
- IPrintLnBold("6...");
- wait 1;
- IPrintLnBold("5...");
- wait 1;
- IPrintLnBold("4...");
- wait 1;
- IPrintLnBold("3...");
- wait 1;
- IPrintLnBold("2...");
- wait 1;
- IPrintLnBold("1...");
- wait 1;
- IPrintLnBold("Teleport complete");
- player SetOrigin((100.5 , -118.5 , 41.25));
- Arena_nuke(100000000, 100000000);
- break;
- }
- else
- {
- trigger playsound("zmb_perks_packa_deny");
- IPrintLnBold("Incomplete, restarting cycle");
- wait 30;
- }
- }
- }
- function setup_vars ()
- {
- level.pillar_1_trigger = GetEnt("level.pillar_1_trigger", "targetname");
- level.pillar_2_trigger = GetEnt("level.pillar_2_trigger", "targetname");
- level.idgun_get = GetEnt("idgun_get", "targetname");
- level.idgun = GetEnt("idgun", "targetname");
- level.idgun_2_trigger = GetEnt("idgun_2_trigger", "targetname");
- level.idgun_2_get = GetEnt("idgun_2_get", "targetname");
- level.idgun_2_rock = GetEnt("idgun_2_rock", "targetname");
- level.idgun_2_upgrade_trigger = GetEnt("idgun_2_upgrade_trigger", "targetname");
- level.idgun_2_upgrade = GetEnt("idgun_2_upgrade", "targetname");
- level.trigger_1_active = false;
- level.trigger_2_active = false;
- level.idgun_2_active = false;
- level.idgun_2_upgrade_active = false;
- level.portal_true = false;
- }
- function idgun_quest()
- {
- level.idgun_get SetHintString("");
- level.idgun_get SetCursorHint("HINT_NOICON");
- level.idgun_2_get SetHintString("");
- level.idgun_2_get SetCursorHint("HINT_NOICON");
- level.idgun_get setorigin (level.idgun_get.origin - (0,0,1000));
- while(level.trigger_1_active == false || level.trigger_2_active == false)
- {
- wait 1;
- }
- level.idgun_get SetHintString("");
- level.idgun_get SetCursorHint("HINT_NOICON");
- level.idgun_get waittill("trigger", player);
- level.idgun_get SetHintString("");
- level.portal_true = true;
- level.idgun delete();
- weaponname = "idgun_0";
- weapon = getWeapon(weaponname);
- player zm_weapons::weapon_give(weapon);
- player zm_weapons::ammo_give(weapon);
- player SwitchToWeapon(weapon);
- }
- function pillar_1()
- {
- level.pillar_1_trigger SetHintString("We were unable to keep it in its deep slumber...");
- level.pillar_1_trigger SetCursorHint("HINT_NOICON");
- level.pillar_1_trigger waittill("trigger", player);
- level.pillar_1_trigger SetHintString("We were unable to keep it in its deep slumber...");
- level.trigger_1_active = true;
- }
- function pillar_2()
- {
- level.pillar_2_trigger SetHintString("It escaped as we were bringing it into the lab for testing...");
- level.pillar_2_trigger SetCursorHint("HINT_NOICON");
- level.pillar_2_trigger waittill("trigger", player);
- level.pillar_2_trigger SetHintString("It escaped as we were bringing it into the lab for testing...");
- level.trigger_2_active = true;
- }
- function upgrade_process()
- {
- desiredweapon = getWeapon("idgun_0"); // Weapon you want the player to have when shot
- trig = GetEnt("idgun_upgrade", "targetname");
- trig waittill( "trigger", player );
- rock = GetEnt("idgun_upgrade_rock", "targetname");
- current_weapon = player getCurrentWeapon();
- while(1)
- {
- if( current_weapon == desiredweapon )
- {
- trig Delete();
- rock Delete();
- weaponname = "idgun_upgraded_0";
- weapon = getWeapon(weaponname);
- player zm_weapons::weapon_give(weapon);
- player zm_weapons::ammo_give(weapon);
- player SwitchToWeapon(weapon);
- }
- else
- {
- level thread upgrade_process();
- }
- break;
- }
- }
- function idgun_2_quest_1()
- {
- while(level.idgun_2_active == false)
- {
- wait 1;
- }
- level.idgun_2_get SetHintString("");
- level.idgun_2_get SetCursorHint("HINT_NOICON");
- level.idgun_2_get waittill("trigger", player);
- level.idgun_2_get SetHintString("");
- weaponname = "idgun_1";
- weapon = getWeapon(weaponname);
- player zm_weapons::weapon_give(weapon);
- player zm_weapons::ammo_give(weapon);
- player SwitchToWeapon(weapon);
- }
- function idgun_2_upgrade(){
- while(level.idgun_2_upgrade_active == false)
- {
- wait 1;
- }
- level.idgun_2_get SetHintString("");
- level.idgun_2_get SetCursorHint("HINT_NOICON");
- level.idgun_2_get waittill("trigger", player);
- level.idgun_2_get SetHintString("");
- weaponname = "idgun_upgraded_1";
- weapon = getWeapon(weaponname);
- player zm_weapons::weapon_give(weapon);
- player zm_weapons::ammo_give(weapon);
- player SwitchToWeapon(weapon);
- }
- function idgun_2_quest_2()
- {
- desiredweapon = getWeapon("idgun_upgraded_0"); // Weapon you want the player to have when shot
- trig = GetEnt("idgun_2_trigger", "targetname");
- trig waittill( "trigger", player );
- rock = GetEnt("level.idgun_2_rock", "targetname");
- current_weapon = player getCurrentWeapon();
- while(1)
- {
- if( current_weapon == desiredweapon )
- {
- trig Delete();
- rock Delete();
- level.idgun_2_active = true;
- }
- else
- {
- level thread idgun_2_quest_2();
- }
- break;
- }
- }
- function idgun_2_quest_3()
- {
- desiredweapon = getWeapon("idgun_1"); // Weapon you want the player to have when shot
- trig = GetEnt("level.idgun_2_upgrade_trigger", "targetname");
- trig waittill( "trigger", player );
- rock = GetEnt("level.idgun_2_upgrade", "targetname");
- current_weapon = player getCurrentWeapon();
- while(1)
- {
- if( current_weapon == desiredweapon )
- {
- trig Delete();
- rock Delete();
- level.idgun_2_upgrade_active = true;
- }
- else
- {
- level thread idgun_2_quest_3();
- }
- break;
- }
- }
- function portal()
- {
- trig = GetEnt("portal", "targetname");
- trig SetHintString("");
- trig SetCursorHint("HINT_NOICON");
- trig waittill("trigger", player);
- trig SetHintString("");
- player SetOrigin((100.5 , -118.5 , 41.25));
- level thread portal();
- }
- function amm_o_matic()
- {
- level.buyable_powerup_trigger = GetEnt("buyable_powerup_trig", "targetname");
- level.buyable_powerup_trigger SetHintString( &"ZOMBIE_NEED_POWER");
- level.buyable_powerup_trigger SetCursorHint("HINT_NOICON");
- level flag::wait_till("power_on");
- level.buyable_powerup_cost = 5000;
- while(1)
- {
- level.buyable_powerup_trigger ("buyable_powerup_trig", "targetname");
- level.buyable_powerup_trigger SetHintString("Press ^3[{+activate}]^7 for Amm-O-Matic [Cost: " + level.buyable_powerup_cost + "]");
- level.buyable_powerup_trigger SetCursorHint("HINT_NOICON");
- buyable_powerup_spawner = struct::get( "powerup_spawn", "targetname" );
- level.buyable_powerup_trigger waittill("trigger", player);
- if(player.score >= level.buyable_powerup_cost)
- {
- player zm_score::minus_to_player_score(level.buyable_powerup_cost);
- buyable_powerup_spawn thread zm_powerups::specific_powerup_drop("full_ammo", buyable_powerup_spawn.origin);
- break;
- }
- else
- {
- level.buyable_powerup_trigger SetHintString("Not enough points");
- wait 1;
- level thread amm_o_matic
- }
- }
- }
- function ritual()
- {
- trig = GetEnt("ritual_trigger", "targetname");
- trig SetHintString("");
- trig SetCursorHint("HINT_NOICON");
- trig waittill("trigger", player);
- trig SetHintString("");
- IPrintLnBold("60 second ritual");
- wait 5;
- zm_powerups::specific_powerup_drop("full_ammo", ((134 , 1564.5 , 24)));
- level thread ritual();
- }
- /*function ammo_matic()
- {
- cost = 5000;
- trigs = GetEntArray( "ammo_matic", "targetname" );
- foreach( trig in trigs )
- {
- trig thread ammo_matic_think( cost );
- trig SetCursorHint( "HINT_NOICON" );
- trig SetHintString( "Press and Hold ^3&&1^7 to Buy Ammo [Cost: "+cost+"]" );
- }
- }
- function ammo_matic_think( cost )
- {
- while(1)
- {
- self waittill( "trigger", player );
- if( player.score >= cost )
- {
- weapon = player GetCurrentWeapon();
- player zm_weapons::weapon_give( weapon );
- PlaySoundAtPosition( "zmb_cha_ching", self.origin );
- player zm_score::minus_to_player_score( cost );
- self SetHintString("");
- wait(3);
- }
- else
- {
- self SetHintString( "You Do Not Have Enough Money" );
- wait(3);
- }
- self SetHintString( "Press and Hold ^3&&1^7 to Buy Ammo [Cost: "+cost+"]" );
- break;
- }
- }*/
- ==================================================
- ^1}*/
- ^1--^
- ^1ERR(0) scripts/zm/zm_rlyeh.gsc (596,3) : syntax error, unexpected $end, expecting TOKEN_RIGHT_CURLY : }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement