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 for Verruckt

[ZM][RELEASE] First Box Patch + Timer + Movement Speed Patch for Verruckt

Scheduled Pinned Locked Moved WAW Modding Releases & Resources
8 Posts 6 Posters 1.2k 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.
  • AlexInVrundefined Offline
    AlexInVrundefined Offline
    AlexInVr
    wrote on last edited by AlexInVr
    #1

    Title says it all, This is a first box patch that will give you the flamethrower and the raygun up until round 20, It also has an integrated timer in it that's synchronized with the game without the need for external software, I can release a version with just the timer and the movement speed if someone would prefer that, just ask me.

    It also patches your backwards and strafe speed movement to console movement, it is 30% slower on pc by default.

    This can be changed using the console if you prefer otherwise

    player_backSpeedScale X (between 0 and 1 default is 0.7 on pc)

    player_strafeSpeedScale X (between 0 and 1 default is 0.7 on pc)

    anyways, add this script into your scripts folder and 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");
    	}
    
    }
    

    Here's what it looks like
    download (2).jpg

    hindercanrunundefined 1 Reply Last reply
    4
    • hindercanrunundefined Offline
      hindercanrunundefined Offline
      hindercanrun
      replied to AlexInVr on last edited by
      #2

      AlexInVr nice

      AlexInVrundefined 1 Reply Last reply
      1
      • AlexInVrundefined Offline
        AlexInVrundefined Offline
        AlexInVr
        replied to hindercanrun on last edited by
        #3

        hindercanrun Thx bro !

        1 Reply Last reply
        0
        • FlixSZNundefined Offline
          FlixSZNundefined Offline
          FlixSZN
          wrote on last edited by
          #4

          I don't really understand where to put your script if i try to put it in the script folder in a txt document when I load the game the patch doesn't work.

          1 Reply Last reply
          0
          • RedxSkullundefined Offline
            RedxSkullundefined Offline
            RedxSkull
            wrote on last edited by
            #5

            FlixSZN It's a GSC script. So change the extension to gsc. If that is still confusing to you. Google it.

            FlixSZNundefined 1 Reply Last reply
            0
            • FlixSZNundefined Offline
              FlixSZNundefined Offline
              FlixSZN
              replied to RedxSkull on last edited by
              #6

              RedxSkull thank you with google and your directions I found out how to make it work !

              g4merboy03undefined 1 Reply Last reply
              0
              • g4merboy03undefined Offline
                g4merboy03undefined Offline
                g4merboy03
                replied to FlixSZN on last edited by
                #7

                FlixSZN how did you do it im so confused and cant figure it out

                1 Reply Last reply
                0
                • LuciTheFenundefined Offline
                  LuciTheFenundefined Offline
                  LuciTheFen
                  wrote on last edited by
                  #8

                  What do i name the folder to put the GSC in? thats literally all i need and im good lol

                  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