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

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. PhD Perma Perk Script for all maps!

PhD Perma Perk Script for all maps!

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
1 Posts 1 Posters 189 Views 1 Watching
  • 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.
  • Coronavirus-19undefined Offline
    Coronavirus-19undefined Offline
    Coronavirus-19
    wrote last edited by Coronavirus-19
    #1

    This script was inspired from the Hell's Vengeance Mod Menu by AlexibuscusGaming

    Code is taken from the Mod Menu and modified by Me!

    • PhD's Damage is infinite in both versions!

    Chat Command Activation

    Say: #perma

    Video | Script Link

    Version 1 Raw Code:

    #include maps\mp\zombies\_zm_utility;
    
    init()
    {
    	level thread monitorPermaCommand();
    }
    
    //
    // ========================================
    // COMMAND MONITOR (#perma)
    // ========================================
    //
    
    monitorPermaCommand()
    {
    	level endon("game_ended");
    
    	prefix = "#";
    
    	for (;;)
    	{
    		level waittill("say", message, player);
    
    		if (!isDefined(message) || !isDefined(player))
    			continue;
    
    		message = toLower(message);
    
    		if (message[0] == prefix)
    		{
    			args = strtok(message, " ");
    			command = getSubStr(args[0], 1);
    
    			if (command == "perma")
    			{
    				player togglephd();
    			}
    		}
    	}
    }
    
    //
    // ========================================
    // TOGGLE PHD
    // ========================================
    //
    
    togglephd()
    {
    	if (!isDefined(self.flopp))
    	{
    		self.flopp = 1;
    		self IPrintLn("^2PHD Flopper Enabled");
    		self thread loopphd();
    	}
    	else
    	{
    		self.flopp = undefined;
    		self IPrintLn("^1PHD Flopper Disabled");
    		self notify("stop_phd");
    	}
    }
    
    //
    // ========================================
    // PHD LOOP
    // ========================================
    //
    
    loopphd()
    {
    	self endon("disconnect");
    	self endon("stop_phd");
    
    	for (;;)
    	{
    		if (isDefined(self.flopp) && isDefined(self.divetoprone) && self.divetoprone)
    		{
    			if (self isOnGround())
    			{
    				self explodephd();
    				wait 0.3;
    			}
    		}
    
    		wait 0.05;
    	}
    }
    
    //
    // ========================================
    // EXPLOSION
    // ========================================
    //
    
    explodephd()
    {
    	if (level.script == "zm_buried" || level.script == "zm_tomb")
    		explosionfx = level._effect["divetonuke_groundhit"];
    	else
    		explosionfx = loadfx("explosions/fx_default_explosion");
    
    	self playsound("zmb_phdflop_explo");
    	playfx(explosionfx, self.origin);
    
    	self damagezombiesinrange(310, self, "kill");
    }
    
    //
    // ========================================
    // DAMAGE ZOMBIES IN RANGE
    // ========================================
    //
    
    damagezombiesinrange(range, what, amount)
    {
    	enemy = getaiarray(level.zombie_team);
    
    	foreach (zombie in enemy)
    	{
    		if (distance(zombie.origin, what.origin) < range)
    		{
    			if (amount == "kill")
    				zombie dodamage(zombie.health * 2, zombie.origin, self);
    			else
    				zombie dodamage(amount, zombie.origin, self);
    		}
    	}
    }
    
    

    Version 2 Raw Code (Actual PhD):

    #include maps\mp\zombies\_zm_utility;
    
    init()
    {
    	level thread monitorPermaCommand();
    }
    
    //
    // ========================================
    // COMMAND MONITOR (#perma)
    // ========================================
    //
    
    monitorPermaCommand()
    {
    	level endon("game_ended");
    
    	prefix = "#";
    
    	for (;;)
    	{
    		level waittill("say", message, player);
    
    		if (!isDefined(message) || !isDefined(player))
    			continue;
    
    		message = toLower(message);
    
    		if (message[0] == prefix)
    		{
    			args = strtok(message, " ");
    			command = getSubStr(args[0], 1);
    
    			if (command == "perma")
    			{
    				player togglephd();
    			}
    		}
    	}
    }
    
    //
    // ========================================
    // TOGGLE PHD
    // ========================================
    //
    
    togglephd()
    {
    	if (!isDefined(self.flopp))
    	{
    		self.flopp = 1;
    		self IPrintLn("^2PHD Flopper Enabled");
    		self thread loopphd();
    		self maps\mp\zombies\_zm_perks::give_perk("specialty_flakjacket");
    	}
    	else
    	{
    		self.flopp = undefined;
    		self IPrintLn("^1PHD Flopper Disabled");
    		self notify("stop_phd");
    	}
    }
    
    //
    // ========================================
    // PHD LOOP
    // ========================================
    //
    
    loopphd()
    {
    	self endon("disconnect");
    	self endon("stop_phd");
    
    	for (;;)
    	{
    		if (isDefined(self.flopp) && isDefined(self.divetoprone) && self.divetoprone)
    		{
    			if (self isOnGround())
    			{
    				self explodephd();
    				wait 0.3;
    			}
    		}
    
    		wait 0.05;
    	}
    }
    
    //
    // ========================================
    // EXPLOSION
    // ========================================
    //
    
    explodephd()
    {
    	if (level.script == "zm_buried" || level.script == "zm_tomb")
    		explosionfx = level._effect["divetonuke_groundhit"];
    	else
    		explosionfx = loadfx("explosions/fx_default_explosion");
    
    	self playsound("zmb_phdflop_explo");
    	playfx(explosionfx, self.origin);
    
    	self damagezombiesinrange(310, self, "kill");
    }
    
    //
    // ========================================
    // DAMAGE ZOMBIES IN RANGE
    // ========================================
    //
    
    damagezombiesinrange(range, what, amount)
    {
    	enemy = getaiarray(level.zombie_team);
    
    	foreach (zombie in enemy)
    	{
    		if (distance(zombie.origin, what.origin) < range)
    		{
    			if (amount == "kill")
    				zombie dodamage(zombie.health * 2, zombie.origin, self);
    			else
    				zombie dodamage(amount, zombie.origin, self);
    		}
    	}
    }
    
    
    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

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