Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. WAW Modding Releases & Resources
  3. [ZM] [RELEASE] First Box patch + timer + movement speed patch NACHT DER UNTOTEN

[ZM] [RELEASE] First Box patch + timer + movement speed patch NACHT DER UNTOTEN

Scheduled Pinned Locked Moved WAW Modding Releases & Resources
10 Posts 5 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined Offline
    undefined Offline
    AlexInVr
    wrote on Aug 8, 2022, 3:36 PM last edited by AlexInVr Aug 13, 2022, 12:19 AM
    #1

    3 out of 4 maps completed, I will release a patch soon for Der Riese

    Timer, basckpeed and strafe speed

    first box up until 20, (flamethrower and raygun)

    Installation:

    • Create a folder named nazi_zombie_prototype in
    %localappdata%/Plutonium/Storage/t4/raw/scripts/sp
    
    • Drop the script inside

    • enjoy

    #include maps\_utility;
    #include common_scripts\utility;
    #include maps\_zombiemode_utility;
    
    //First Box by twitch.tv/AlexInVR
    
    init()
    {
    	 replacefunc(maps\_zombiemode_weapons::treasure_chest_ChooseRandomWeapon, ::custom_treasure_chest_ChooseRandomWeapon);
    	 replacefunc(maps\_zombiemode_weapons::treasure_chest_weapon_spawn, ::custom_treasure_chest_weapon_spawn);
    	thread onConnect();
       
    }
    
    onConnect()
    {
    	for(;;)
    	{
    		level waittill( "connecting", player );
    		player thread OnPlayerSpawned();
    	}
    }
    
    
    game_timer()
    {	
    	hud = create_simple_hud( self );
    	hud.foreground = true; 
    	hud.sort = 1; 
    	hud.hidewheninmenu = true; 
    	hud.alignX = "left"; 
    	hud.alignY = "top";
    	hud.horzAlign = "user_left"; 
    	hud.vertAlign = "user_top";
    	hud.x = hud.x - -700; 
    	hud.y = hud.y + 35; 
    	hud.alpha = 1;
    	time_text = string(GetTime() / 1000);
    	flag_wait("all_players_spawned");
    	while (1){
    		hud setTimerUp(1);
    		hud setTimer(time_text);
    	}
    	
    }
    
    
    custom_treasure_chest_ChooseRandomWeapon( player )
    {
    	if (level.round_number <= 20){
    		if (!(player HasWeapon("m2_flamethrower_zombie"))){
    			return "m2_flamethrower_zombie";
    		}
    
    		if (!(player HasWeapon("ray_gun"))){
    			return "ray_gun";
    		}
    
    		
    	}
    
    	keys = GetArrayKeys( level.zombie_weapons );
    
    	// Filter out any weapons the player already has
    	filtered = [];
    	for( i = 0; i < keys.size; i++ )
    	{
    		if( player HasWeapon( keys[i] ) )
    		{
    			continue;
    		}
    
    		//chrisP - make sure the chest doesn't give the player a bouncing betty
    		if(keys[i] == "mine_bouncing_betty")
    		{
    			continue;
    		}
    
    		filtered[filtered.size] = keys[i];
    	}
    
    	// Filter out the limited weapons
    	if( IsDefined( level.limited_weapons ) )
    	{
    		keys2 = GetArrayKeys( level.limited_weapons );
    		players = get_players();
    		for( q = 0; q < keys2.size; q++ )
    		{
    			count = 0;
    			for( i = 0; i < players.size; i++ )
    			{
    				if( players[i] HasWeapon( keys2[q] ) )
    				{
    					count++;
    				}
    
    				// check for last stand weapons that might not be on the player at the time
    				if (players[i] maps\_laststand::player_is_in_laststand())
    				{
    					for( m = 0; m < players[i].weaponInventory.size; m++ )
    					{
    						if (players[i].weaponInventory[m] == keys2[q])
    						{
    							count++;
    						}
    					}
    				}
    			}
    
    			if( count == level.limited_weapons[keys2[q]] )
    			{
    				filtered = array_remove( filtered, keys2[q] );
    			}
    		}
    	}
    
    	return filtered[RandomInt( filtered.size )];
    }
    
    custom_treasure_chest_weapon_spawn( chest, player )
    {
    	assert(IsDefined(player));
    	// spawn the model
    	model = spawn( "script_model", self.origin ); 
    	model.angles = self.angles +( 0, 90, 0 );
    
    	floatHeight = 40;
    
    	//move it up
    	model moveto( model.origin +( 0, 0, floatHeight ), 3, 2, 0.9 ); 
    
    	// rotation would go here
    
    	// make with the mario kart
    	modelname = undefined; 
    	rand = undefined; 
    	for( i = 0; i < 40; i++ )
    	{
    
    		if( i < 20 )
    		{
    			wait( 0.05 ); 
    		}
    		else if( i < 30 )
    		{
    			wait( 0.1 ); 
    		}
    		else if( i < 35 )
    		{
    			wait( 0.2 ); 
    		}
    		else if( i < 38 )
    		{
    			wait( 0.3 ); 
    		}
    
    		rand = custom_treasure_chest_ChooseRandomWeapon( player );
    		modelname = GetWeaponModel( rand );
    		model setmodel( modelname ); 
    
    
    	}
    
    	self.weapon_string = rand; // here's where the org get it's weapon type for the give function
    
    	// random change of getting the joker that moves the box
    	rand = Randomint(100);
    
    
    	//increase the chance of joker appearing from 0-100 based on amount of the time chest has been opened.
    	if(level.script != "nazi_zombie_prototype" && getdvar("magic_chest_movable") == "1")
    	{
    
    		if(level.chest_accessed < 5)
    		{		
    			chance_of_joker = 0;
    		}
    		else
    		{
    			chance_of_joker = level.chest_accessed + 3;
    		}
    
    		if (rand <= chance_of_joker)
    		{
    			model SetModel("zombie_teddybear");
    		//	model rotateto(level.chests[level.chest_index].angles, 0.01);
    			//wait(1);
    			model.angles = level.chests[level.chest_index].angles;		
    			wait 1;
    			flag_set("moving_chest_now");
    			level.chest_accessed = 0;
    
    			player maps\_zombiemode_score::add_to_player_score( 950 );
    
    		}
    
    	}
    
    	self notify( "randomization_done" );
    
    	if (flag("moving_chest_now"))
    	{
    		wait .5;	// we need a wait here before this notify
    		level notify("weapon_fly_away_start");
    		wait 2;
    		model MoveZ(500, 4, 3);
    		model waittill("movedone");
    		model delete();
    		self notify( "box_moving" );
    		level notify("weapon_fly_away_end");
    	}
    	else
    	{
    
    		model thread timer_til_despawn(floatHeight);
    		self waittill( "weapon_grabbed" );
    
    		if( !chest.timedOut )
    		{
    			model Delete();
    		}
    
    
    	}
    }
    
    
    
    timer_til_despawn(floatHeight)
    {
    
    
    	// SRS 9/3/2008: if we timed out, move the weapon back into the box instead of deleting it
    	putBackTime = 12;
    	self MoveTo( self.origin - ( 0, 0, floatHeight ), putBackTime, ( putBackTime * 0.5 ) );
    	wait( putBackTime );
    
    	if(isdefined(self))
    	{	
    		self Delete();
    	}
    }
    
    
    onPlayerSpawned()
    {
    	self endon( "disconnect" ); 
    
    	for( ;; )
    	{
    		
    		level waittill( "connected", player ); 
    		self thread game_timer();
    		self SetClientDvars( 
    			"player_backSpeedScale", "1", 
    			"player_strafeSpeedScale", "1");
    
    		
    		wait 3;
    
    		self IPrintLnBold("First box by ^1twitch.tv/^2AlexInVR");
    	}
    	level waittill( "connected", player ); 
    	
    }
    
    
    MrConfettiundefined 1 Reply Last reply Aug 12, 2022, 7:46 PM
    2
    • MrConfettiundefined Offline
      MrConfettiundefined Offline
      MrConfetti
      replied to AlexInVr on Aug 12, 2022, 7:46 PM last edited by
      #2

      AlexInVr Would there be a way to have just the timer and move speed fix, I cant seem to find those standalone.

      undefined 1 Reply Last reply Aug 12, 2022, 9:19 PM
      0
      • undefined Offline
        undefined Offline
        AlexInVr
        replied to MrConfetti on Aug 12, 2022, 9:19 PM last edited by
        #3

        MrConfetti For sure,

        #include maps\_utility;
        #include common_scripts\utility;
        #include maps\_zombiemode_utility;
        
        //First Box by twitch.tv/AlexInVR
        
        init()
        {
        	thread OnPlayerConnect();
           
        }
        
        OnPlayerConnect()
        {
        	for(;;)
        	{
        		level waittill( "connecting", player );
        		player thread OnPlayerSpawned();
        	}
        }
        
        
        
        game_timer()
        {	
        	hud = create_simple_hud( self );
        	hud.foreground = true; 
        	hud.sort = 1; 
        	hud.hidewheninmenu = true; 
        	hud.alignX = "left"; 
        	hud.alignY = "top";
        	hud.horzAlign = "user_left"; 
        	hud.vertAlign = "user_top";
        	hud.x = hud.x - -700; 
        	hud.y = hud.y + 35; 
        	hud.alpha = 1;
        	time_text = string(GetTime() / 1000);
        	flag_wait("all_players_spawned");
        	while (1){
        		hud setTimerUp(1);
        		hud setTimer(time_text);
        	}
        	
        }
        
        OnPlayerSpawned()
        {
        	self endon( "disconnect" ); 
        
        	for( ;; )
        	{
        		
        		level waittill( "connected", player ); 
        		self thread game_timer();
        		self SetClientDvars( 
        			"player_backSpeedScale", "1", 
        			"player_strafeSpeedScale", "1");
        
        		
        		wait 3;
        
        		self IPrintLnBold("Timer and speed patch by ^1twitch.tv/^2AlexInVR");
        	}
        	level waittill( "connected", player ); 
        	
        }   
        
        MrConfettiundefined 1 Reply Last reply Aug 13, 2022, 11:26 PM
        0
        • MrConfettiundefined Offline
          MrConfettiundefined Offline
          MrConfetti
          replied to AlexInVr on Aug 13, 2022, 11:26 PM last edited by
          #4

          AlexInVr Thanks so much, godspeed to you

          undefined 1 Reply Last reply Aug 14, 2022, 1:17 AM
          1
          • undefined Offline
            undefined Offline
            AlexInVr
            replied to MrConfetti on Aug 14, 2022, 1:17 AM last edited by
            #5

            MrConfetti Welcome my friend ! 🙂

            1 Reply Last reply
            0
            • chuyito9154undefined Offline
              chuyito9154undefined Offline
              chuyito9154
              wrote on Aug 14, 2022, 7:16 PM last edited by
              #6

              que es lo que hace este mod?

              undefined aku_undefined 2 Replies Last reply Aug 17, 2022, 2:47 PM
              0
              • undefined Offline
                undefined Offline
                AlexInVr
                replied to chuyito9154 on Aug 17, 2022, 2:47 PM last edited by
                #7

                chuyito9154 I'm sorry bro I don't speak spanish, using google translate your comment asks what does this mod do, without offense, I wrote everything in the title and the description of the post my guy, idk what to tell you more 😕

                1 Reply Last reply
                0
                • aku_undefined Offline
                  aku_undefined Offline
                  aku_
                  replied to chuyito9154 on Oct 7, 2022, 3:39 PM last edited by
                  #8

                  chuyito9154 no es un mod, es un parche. first box-timer- fix speed

                  1 Reply Last reply
                  1
                  • WockXundefined Offline
                    WockXundefined Offline
                    WockX
                    wrote on Jan 8, 2023, 5:16 PM last edited by
                    #9

                    How do I properly set this patch up? I dropped it in the nazi_zombie_prototype Folder as a txt Doc. but still wont run as intended. Could you maybe help clarify on the correct way to have it set up? I even downloaded Notepad++ to see if it would let me convert it to a GSC file but couldn't figure it out unfortunately. I just got into modding so this is all very new to me. This Photo is how I have it set up as of now. Screenshot 2023-01-08 121214.png

                    undefined 1 Reply Last reply Feb 3, 2023, 8:30 PM
                    0
                    • undefined Offline
                      undefined Offline
                      AlexInVr
                      replied to WockX on Feb 3, 2023, 8:30 PM last edited by
                      #10

                      WockX you need to change the extension of the file to .gsc, in your windows explorer, click "View" then there should be an option called something like "Show file extensions" click that, you will now see your file as .txt, rename it, and rename the .txt to .gsc

                      1 Reply Last reply
                      0

                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Donate