What this Script Means help

BlackOpsModder

Veteran
Messages
80
Reaction score
20
Points
578
I need help with what this script exactly means it has something to do with the Waffle in box, but I don`t got it what does exactly it means...
Code:
default_tesla_weighting_func()
{
    num_to_add = 1;
    if( isDefined( level.pulls_since_last_tesla_gun ) )
    {
        // player has dropped the tesla for another weapon, so we set all future polls to 20%
        if( isDefined(level.player_drops_tesla_gun) && level.player_drops_tesla_gun == true )
        {                       
            num_to_add += int(.2 * level.zombie_include_weapons.size);       
        }
        
        // player has not seen tesla gun in late rounds
        if( !isDefined(level.player_seen_tesla_gun) || level.player_seen_tesla_gun == false )
        {
            // after round 10 the Tesla gun percentage increases to 20%
            if( level.round_number > 10 )
            {
                num_to_add += int(.2 * level.zombie_include_weapons.size);
            }       
            // after round 5 the Tesla gun percentage increases to 15%
            else if( level.round_number > 5 )
            {
                // calculate the number of times we have to add it to the array to get the desired percent
                num_to_add += int(.15 * level.zombie_include_weapons.size);
            }                       
        }
    }
    return num_to_add;
}
 

BlackOpsModder

Veteran
Messages
80
Reaction score
20
Points
578
Also this one
{ acquire_weapon_toggle( rand, player ); //turn off power weapon, since player just got one if( rand == "tesla_gun_zm" || rand == "ray_gun_zm" ) { if( rand == "ray_gun_zm" ) { // level.chest_moves = false; level.pulls_since_last_ray_gun = 0; } if( rand == "tesla_gun_zm" ) { level.pulls_since_last_tesla_gun = 0; level.player_seen_tesla_gun = true; } }
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,332
Reaction score
770
Points
973
It literally tells you what it means.
 

Pyrex BLJ

im done :)
Staff member
Messages
607
Reaction score
339
Points
953
I Think It Gives A Weapon In Zombies But Im **** So Dunno
// player has dropped the tesla for another weapon, so we set all future polls to 20%
// player has not seen tesla gun in late rounds
// after round 10 the Tesla gun percentage increases to 20%
// after round 5 the Tesla gun percentage increases to 15%
// calculate the number of times we have to add it to the array to get the desired percent
 

BlackOpsModder

Veteran
Messages
80
Reaction score
20
Points
578
"// calculate the number of times we have to add it to the array to get the desired percent"
Didnt got this one...
 

BlackOpsModder

Veteran
Messages
80
Reaction score
20
Points
578
If i increase the first one to 30 after first waffle i get it will be 30% get the next?
The seconf if I do 30% it will be 30%?
The third if I do 30% it will be 30%?
Also what does the statements true and false means?
 

Pyrex BLJ

im done :)
Staff member
Messages
607
Reaction score
339
Points
953
If i increase the first one to 30 after first waffle i get it will be 30% get the next?
The seconf if I do 30% it will be 30%?
The third if I do 30% it will be 30%?
Also what does the statements true and false means?
yes changing the decimal value in a line like this
Code:
num_to_add += int(.2 * level.zombie_include_weapons.size);
will make the percentage whatever decimal you put in
 

BlackOpsModder

Veteran
Messages
80
Reaction score
20
Points
578
it will add the waff to the box weapon array more than once to make it have a 15-20% chance of being grabbed
Ok
What about this one?
{ acquire_weapon_toggle( rand, player ); //turn off power weapon, since player just got one if( rand == "tesla_gun_zm" || rand == "ray_gun_zm" ) { if( rand == "ray_gun_zm" ) { // level.chest_moves = false; level.pulls_since_last_ray_gun = 0; } if( rand == "tesla_gun_zm" ) { level.pulls_since_last_tesla_gun = 0; level.player_seen_tesla_gun = true; } }
 

BlackOpsModder

Veteran
Messages
80
Reaction score
20
Points
578
yes changing the decimal value in a line like this
Code:
num_to_add += int(.2 * level.zombie_include_weapons.size);
will make the percentage whatever decimal you put in
I gotta do that, but I through the percentages were wrong, cuz it looks to take more time to get the wafflw when im in game...
 

Pyrex BLJ

im done :)
Staff member
Messages
607
Reaction score
339
Points
953
Ok
What about this one?
{ acquire_weapon_toggle( rand, player ); //turn off power weapon, since player just got one if( rand == "tesla_gun_zm" || rand == "ray_gun_zm" ) { if( rand == "ray_gun_zm" ) { // level.chest_moves = false; level.pulls_since_last_ray_gun = 0; } if( rand == "tesla_gun_zm" ) { level.pulls_since_last_tesla_gun = 0; level.player_seen_tesla_gun = true; } }
Code:
//turn off power weapon, since player just got one
if( rand == "tesla_gun_zm" || rand == "ray_gun_zm" )
{
if( rand == "ray_gun_zm" )
{
// level.chest_moves = false;
level.pulls_since_last_ray_gun = 0;
}

if you already have a wonder weapon make sure you cant get another one
Code:
if( rand == "tesla_gun_zm" )
{
level.pulls_since_last_tesla_gun = 0;
level.player_seen_tesla_gun = true;
}

count the amount of box rolls you have had since you put the wonder weapon back in the box
 

Pyrex BLJ

im done :)
Staff member
Messages
607
Reaction score
339
Points
953
I gotta do that, but I through the percentages were wrong, cuz it looks to take more time to get the wafflw when im in game...
just because it might take more pulls just means you have bad luck, not that the percentage isnt changed. these also only take effect after certain rounds
 

BlackOpsModder

Veteran
Messages
80
Reaction score
20
Points
578
Code:
//turn off power weapon, since player just got one
if( rand == "tesla_gun_zm" || rand == "ray_gun_zm" )
{
if( rand == "ray_gun_zm" )
{
// level.chest_moves = false;
level.pulls_since_last_ray_gun = 0;
}

if you already have a wonder weapon make sure you cant get another one
Code:
if( rand == "tesla_gun_zm" )
{
level.pulls_since_last_tesla_gun = 0;
level.player_seen_tesla_gun = true;
}

count the amount of box rolls you have had since you put the wonder weapon back in the box

"if you already have a wonder weapon make sure you cant get another one "
I dont get how the first statement is true, as U can have the raygun and waffle at the same time...
 

Pyrex BLJ

im done :)
Staff member
Messages
607
Reaction score
339
Points
953
"if you already have a wonder weapon make sure you cant get another one "
I dont get how the first statement is true, as U can have the raygun and waffle at the same time...
mainly so in a multiplayer game other players cant have a waf if you already have one
 

BlackOpsModder

Veteran
Messages
80
Reaction score
20
Points
578
Doesnt works put the percentages like that

default_tesla_weighting_func() { num_to_add = 1; if( isDefined( level.pulls_since_last_tesla_gun ) ) { // player has dropped the tesla for another weapon, so we set all future polls to 30% if( isDefined(level.player_drops_tesla_gun) && level.player_drops_tesla_gun == true ) { num_to_add += int(.3 * level.zombie_include_weapons.size); } // player has not seen tesla gun in late rounds if( !isDefined(level.player_seen_tesla_gun) || level.player_seen_tesla_gun == false ) { // after round 10 the Tesla gun percentage increases to 99% if( level.round_number > 10 ) { num_to_add += int(.99 * level.zombie_include_weapons.size); } // after round 5 the Tesla gun percentage increases to 50% else if( level.round_number > 5 ) { // calculate the number of times we have to add it to the array to get the desired percent num_to_add += int(.50 * level.zombie_include_weapons.size); } } } return num_to_add; }

Rounds 5-9
11th waffle traded waffle
6 pulls no waffle
Round 10
7th 8th 9th 10th 11th 12th 13th and still no waffle
 

Pyrex BLJ

im done :)
Staff member
Messages
607
Reaction score
339
Points
953
Doesnt works put the percentages like that

default_tesla_weighting_func() { num_to_add = 1; if( isDefined( level.pulls_since_last_tesla_gun ) ) { // player has dropped the tesla for another weapon, so we set all future polls to 30% if( isDefined(level.player_drops_tesla_gun) && level.player_drops_tesla_gun == true ) { num_to_add += int(.3 * level.zombie_include_weapons.size); } // player has not seen tesla gun in late rounds if( !isDefined(level.player_seen_tesla_gun) || level.player_seen_tesla_gun == false ) { // after round 10 the Tesla gun percentage increases to 99% if( level.round_number > 10 ) { num_to_add += int(.99 * level.zombie_include_weapons.size); } // after round 5 the Tesla gun percentage increases to 50% else if( level.round_number > 5 ) { // calculate the number of times we have to add it to the array to get the desired percent num_to_add += int(.50 * level.zombie_include_weapons.size); } } } return num_to_add; }

Rounds 5-9
11th waffle traded waffle
6 pulls no waffle
Round 10
7th 8th 9th 10th 11th 12th 13th and still no waffle
then theres probably another place it checks for percentages or something
 
Top