• Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse

Plutonium

[ZM][RELEASE] First box patch + timer + movement speed for Der Riese

Scheduled Pinned Locked Moved WAW Modding Releases & Resources
10 Posts 7 Posters 597 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
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

    There is, the final First box patch for WAW, all 4 maps are now patched.

    Installation

    • Create a folder named nazi_zombie_factory inside %localappdata%/Plutonium/storage/t4/raw/scripts/sp

    • Create a file with the name of your choice, that ends with the file extension GSC, so for example, file.gsc

    • Paste the code inside this file

    • save it

    • you now have a script

    • Drop the script inside

    • Enjoy

    
    #include maps\_utility;
    #include common_scripts\utility;
    #include maps\_zombiemode_utility;
    
    //First Box by twitch.tv/AlexInZombies
    
    init()
    {
    	 replacefunc(maps\_zombiemode_weapons::treasure_chest_ChooseRandomWeapon, ::custom_treasure_chest_ChooseRandomWeapon);
         replacefunc(maps\_zombiemode_weapons::treasure_chest_ChooseWeightedRandomWeapon, ::custom_treasure_chest_ChooseWeightedRandomWeapon);
    	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);
    	}
    	
    }
    
    
    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();
    	}
    }
    
    
    
    
    
    
    
    custom_treasure_chest_ChooseRandomWeapon( player )
    {
    	if (level.round_number <= 20){
    		if (!(player HasWeapon("tesla_gun"))){
    			return "tesla_gun";
    		}
    
    		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( !maps\_zombiemode_weapons::get_is_in_box( keys[i] ) )
    		{
    			continue;
    		}
    		
    		if( player maps\_zombiemode_weapons::has_weapon_or_upgrade( keys[i] ) )
    		{
    			continue;
    		}
    
    		if( !IsDefined( keys[i] ) )
    		{
    			continue;
    		}
    
    		filtered[filtered.size] = keys[i];
    	}
    	
    	// Filter out the limited weapons
    	if( IsDefined( level.limited_weapons ) )
    	{
    		keys2 = GetArrayKeys( level.limited_weapons );
    		players = get_players();
    		pap_triggers = GetEntArray("zombie_vending_upgrade", "targetname");
    		for( q = 0; q < keys2.size; q++ )
    		{
    			count = 0;
    			for( i = 0; i < players.size; i++ )
    			{
    				if( players[i] maps\_zombiemode_weapons::has_weapon_or_upgrade( keys2[q] ) )
    				{
    					count++;
    				}
    			}
    
    			// Check the pack a punch machines to see if they are holding what we're looking for
    			for ( k=0; k<pap_triggers.size; k++ )
    			{
    				if ( IsDefined(pap_triggers[k].current_weapon) && pap_triggers[k].current_weapon == keys2[q] )
    				{
    					count++;
    				}
    			}
    
    			if( count >= level.limited_weapons[keys2[q]] )
    			{
    				filtered = array_remove( filtered, keys2[q] );
    			}
    		}
    	}
    
    	return filtered[RandomInt( filtered.size )];
    }
    
    custom_treasure_chest_ChooseWeightedRandomWeapon( player )
    {
    
    	if (level.round_number <= 20){
    		if (!(player HasWeapon("tesla_gun"))){
    			return "tesla_gun";
    		}
    
    		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( !maps\_zombiemode_weapons::get_is_in_box( keys[i] ) )
    		{
    			continue;
    		}
    		
    		if( player maps\_zombiemode_weapons::has_weapon_or_upgrade( keys[i] ) )
    		{
    			continue;
    		}
    
    		if( !IsDefined( keys[i] ) )
    		{
    			continue;
    		}
    
    		num_entries = [[ level.weapon_weighting_funcs[keys[i]] ]]();
    		
    		for( j = 0; j < num_entries; j++ )
    		{
    			filtered[filtered.size] = keys[i];
    		}
    	}
    	
    	// Filter out the limited weapons
    	if( IsDefined( level.limited_weapons ) )
    	{
    		keys2 = GetArrayKeys( level.limited_weapons );
    		players = get_players();
    		pap_triggers = GetEntArray("zombie_vending_upgrade", "targetname");
    		for( q = 0; q < keys2.size; q++ )
    		{
    			count = 0;
    			for( i = 0; i < players.size; i++ )
    			{
    				if( players[i] maps\_zombiemode_weapons::has_weapon_or_upgrade( keys2[q] ) )
    				{
    					count++;
    				}
    			}
    
    			// Check the pack a punch machines to see if they are holding what we're looking for
    			for ( k=0; k<pap_triggers.size; k++ )
    			{
    				if ( IsDefined(pap_triggers[k].current_weapon) && pap_triggers[k].current_weapon == keys2[q] )
    				{
    					count++;
    				}
    			}
    
    			if( count >= level.limited_weapons[keys2[q]] )
    			{
    				filtered = array_remove( filtered, keys2[q] );
    			}
    		}
    	}
    	
    	return filtered[RandomInt( filtered.size )];
    }
    
    
    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/^2AlexInZombies");
    	}
    	
    }
    
    1 Reply Last reply
    1
  • Cornal_Fundefined Offline
    Cornal_Fundefined Offline
    Cornal_F
    wrote on last edited by
    #2

    The way you explain this makes no sense to me. So idk what to do exactly.

    WolflexZundefined FaZe Flickundefined 2 Replies Last reply
    0
  • WolflexZundefined Offline
    WolflexZundefined Offline
    WolflexZ Contributor
    replied to Cornal_F on last edited by
    #3

    Cornal_F You create a txt file anywhere and copy and paste the code into it. You then pull the file into a compiler, which changes it to a script file. You then put the file into %localappdata%/Plutonium/storage/t4/raw/scripts/sp

    Cornal_Fundefined 1 Reply Last reply
    0
  • Cornal_Fundefined Offline
    Cornal_Fundefined Offline
    Cornal_F
    replied to WolflexZ on last edited by
    #4

    WolflexZ ok thank you, but I'm still confused on compiling the file?

    1 Reply Last reply
    0
  • AkaHexxundefined Offline
    AkaHexxundefined Offline
    AkaHexx
    wrote on last edited by
    #5

    Hey, what can I use to compile this script I don't really heavily go into waw modding.

    1 Reply Last reply
    0
  • Xerxesundefined Online
    Xerxesundefined Online
    Xerxes Plutonium Staff
    wrote on last edited by
    #6

    You don't need to compile anything, the game will do that when it tries to load the file.

    1 Reply Last reply
    0
  • FaZe Flickundefined Offline
    FaZe Flickundefined Offline
    FaZe Flick
    replied to Cornal_F on last edited by
    #7

    Cornal_F exactly what im saying lmao. he doesnt compile his scripts

    AlexInVrundefined 1 Reply Last reply
    0
  • AlexInVrundefined Offline
    AlexInVrundefined Offline
    AlexInVr
    replied to FaZe Flick on last edited by
    #8

    FaZe Flick I don't compile them because there is no need to, the game will compile it at runtime

    1 Reply Last reply
    0
  • zrMstrezundefined Offline
    zrMstrezundefined Offline
    zrMstrez
    wrote on last edited by
    #9

    is there any way to increase the chance of getting a weapon in the mystery box?? not getting it on the first hit just make it easier to get

    AlexInVrundefined 1 Reply Last reply
    0
  • AlexInVrundefined Offline
    AlexInVrundefined Offline
    AlexInVr
    replied to zrMstrez on last edited by
    #10

    zrMstrez it is possible but unfortunately not the goal of this, and I would see no use of it personally so I will not make it, sorry to disapoint

    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
  • Login

  • Don't have an account? Register

  • Login or register to search.