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

Plutonium

ReuSundefined

ReuS

@ReuS
About
Posts
2
Topics
1
Groups
0
Followers
1
Following
1

Posts

Recent Best Controversial

  • Buried - Disable Timebomb to prevent Timebomb Glitch
    ReuSundefined ReuS

    I'm reviving this old thread, but if you want to disable points duplication while still allowing the timebomb (for EE or regular use), you can use this code, which simply disables points duping. 🙂
    in scripts/zm/zm_buried:

    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\zombies\_zm_utility;
    #include maps\mp\gametypes_zm\_hud_util;
    #include maps\mp\zombies\_zm_weapons;
    #include maps\mp\_visionset_mgr;
    #include maps\mp\zombies\_zm_audio;
    #include maps\mp\zombies\_zm_blockers;
    #include maps\mp\zombies\_zm_laststand;
    #include maps\mp\zombies\_zm_weapon_locker;
    #include maps\mp\zombies\_zm_magicbox;
    #include maps\mp\zombies\_zm_perks;
    #include maps\mp\zombies\_zm_score;
    #include maps\mp\zombies\_zm_stats;
    #include maps\mp\zombies\_zm_equipment;
    #include maps\mp\zombies\_zm;
    #include maps\mp\zombies\_zm_spawner;
    #include maps\mp\animscripts\zm_death;
    #include maps\mp\zombies\_zm_ai_basic;
    
    
    main(){
            replaceFunc(maps\mp\zombies\_zm_weap_time_bomb::_time_bomb_restores_player_data_internal, ::_time_bomb_restores_player_data_internal_override);
    }
    
    _time_bomb_restores_player_data_internal_override( save_struct )
    {
        self endon( "death" );
        self endon( "disconnect" );
    
        if ( self maps\mp\zombies\_zm_laststand::player_is_in_laststand() )
        {
            debug_time_bomb_print( "TIMEBOMB >> " + self.name + " in last stand, reviving..." );
            self maps\mp\zombies\_zm_laststand::auto_revive( self );
        }
        else if ( isdefined( self.sessionstate ) && self.sessionstate == "spectator" )
        {
            self [[ level.spawnplayer ]]();
            self thread refresh_player_navcard_hud();
        }
    
        if ( isdefined( self.is_drinking ) && self.is_drinking )
        {
            if ( self has_packapunch_weapon() )
                self.is_drinking++;
    
            self thread maps\mp\zombies\_zm_perks::perk_abort_drinking( 0.1 );
        }
    
        if ( self can_time_bomb_restore_data_on_player( save_struct ) )
        {
            debug_time_bomb_print( "TIMEBOMB >> restoring player " + self.name );
    
            if ( !isdefined( self.time_bomb_save_data ) && !isdefined( save_struct ) )
                self.time_bomb_save_data = spawnstruct();
    
            if ( !isdefined( save_struct ) )
                s_temp = self.time_bomb_save_data;
            else
                s_temp = save_struct.player_saves[self getentitynumber()];
    
            self setorigin( s_temp.player_origin );
            self setplayerangles( s_temp.player_angles );
            self setstance( s_temp.player_stance );
            self thread _restore_player_perks_and_weapons( s_temp );
            n_difference_in_score = s_temp.points_current - self.score;
    
    
            // Comment here to avoid points duplication
            
            // if ( n_difference_in_score > 0 )
            //     self maps\mp\zombies\_zm_score::add_to_player_score( n_difference_in_score );
            // else
            //     self maps\mp\zombies\_zm_score::minus_to_player_score( abs( n_difference_in_score ) );
    
            if ( is_weapon_locker_available_in_game() )
            {
                if ( isdefined( s_temp.weapon_locker_data ) )
                    self maps\mp\zombies\_zm_weapon_locker::wl_set_stored_weapondata( s_temp.weapon_locker_data );
                else
                    self maps\mp\zombies\_zm_weapon_locker::wl_clear_stored_weapondata();
            }
    
            if ( isdefined( s_temp.account_value ) && isdefined( level.banking_map ) )
            {
                self.account_value = s_temp.account_value;
                self maps\mp\zombies\_zm_stats::set_map_stat( "depositBox", self.account_value, level.banking_map );
            }
    
            s_temp.save_ready = 1;
    
            if ( !isdefined( save_struct ) )
                self.time_bomb_save_data = s_temp;
    
            self ent_flag_wait( "time_bomb_restore_thread_done" );
        }
        else
        {
            debug_time_bomb_print( "TIMEBOMB >> restoring player " + self.name + " FAILED. No matching save detected" );
            self restore_player_to_initial_loadout();
        }
    
        self _give_revive_points( s_temp );
    }
    

  • Zombie AFK command
    ReuSundefined ReuS

    Sharing my AFK command, inspired by THS.Shiniri command reworked it for my uses.

    Features

    • Paid AFK command ($10,000 per minute).
    • If the player moves, they are refunded for the remaining time, and AFK mode is canceled.
    cmd_afk(args){
        assert(string::to_lower(args[0]) == "!afk");
        if (args.size < 2){
            self tell("Usage: !afk <minutes>");
            return;
        }
        if (int(args[1]) < 0){
            self tell("You can't be afk for negative time");
            return;
        }
        if (!isNumeric(args[1])) {
            self tell("Invalid input! Please enter a valid number.");
            return;
        }
    
        if (int(args[1]) * 10000 > self.score){
            self tell("You don't have enough money to be afk for that long");
            return;
        }
        self.score -= int(args[1]) * 10000;
    
        seconds_to_be_afk = int(args[1]) * 60;
        if (seconds_to_be_afk > 1800) {
            self tell("You can't be afk for more than 30 minutes");
            return;
        }
        counter = 0;
        for (i = 3; i > 0; i--) {
            self tell("Going AFK in " + i + "...");
            wait 1;
        }
    	old_origin = self.origin;
    	old_angles = self getPlayerAngles();
    
        for(;;) {
            if (counter == 0) {
                self.ignoreme = 1; // Zombies wont find the player
                self enableInvulnerability(); // God mode is on
                say(self.name + " is ^1AFK for " + args[1] + " minute(s)");
            } else if (counter == seconds_to_be_afk) {
                self.ignoreme = 0;
                self disableInvulnerability();
                say (self.name + " is no longer AFK");
                break;
            } else if (seconds_to_be_afk - counter <= 10) {
                self tell("Time afk left: " + (seconds_to_be_afk - counter) + " seconds");
            } else if ((seconds_to_be_afk - counter) % 10 == 0) {
                self tell("Time afk left: " + (seconds_to_be_afk - counter) + " seconds");
            }
    
            // Check if the player has moved
            if (self.origin != old_origin || self getPlayerAngles() != old_angles) {
                remaining_seconds_afk = seconds_to_be_afk - counter;
                self.ignoreme = 0;
                self disableInvulnerability();
                self tell("You moved! AFK disabled. Refunding remaining time.");
                self.score += remaining_seconds_afk * 166;
                say (self.name + " is no longer AFK");
                break;
            }
            counter++;
            wait 1;
        }
    }
    
    isNumeric(str) {
        if (!isDefined(str) || str == "") {
            return false;
        }
    
        for (i = 0; i < str.size; i++) {
            if (str[i] < "0" || str[i] > "9") {
                return false;
            }
        }
        return true;
    }
    
    
    
  • 1 / 1
  • Login

  • Don't have an account? Register

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