UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

[Script] Stalker Perk (Without an Actual Perk)

broken avatar :(
Created 9 years ago
by DidUknowiPwn
0 Members and 1 Guest are viewing this topic.
5,142 views
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 7 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Here's a simple script for you guys, was bored made this in 2 hours.

Initialize the GSC by going to _zombiemode.gsc, find the lines around here:

And thread your GSC, currently it activates on spawn and doesn't use any perks.
Code Snippet
Plaintext
// ==========================================================
// Coding Projects
//
// Component: WaW
// Purpose: Stalker Script
//
// Initial author: DidUknowiPwn
// Started: 2015-01-15
// © 2015 DidUknowiPwn™
// ==========================================================
#include common_scriptsutility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_loadout;

init()
{
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;;)
{
level waittill("connecting", player);
player.speedScale = undefined;
player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnct");
for(;;)
{
self waittill("spawned_player");
self.speedScale = 1;
self SetClientDvars( "bg_bobAmplitudeDucked", "0.0075 0.0075",
"bg_bobAmplitudeStanding", "0.007 0.007");
self thread stalker_think();
}
}

stalker_think()
{
self endon("death");
self endon("disconnect");
self endon("player_downed");

if(!IsDefined(self.speedScale))
self.speedScale = 1;
//DUKIP - Scoped vars initalized.
stalkerSpeedScale = undefined;
currWeap = undefined;

while(IsAlive(self))
{
//DUKIP - Grab our current weapon.
currWeap = self getCurrentWeapon();
//DUKIP - When ADS Button Pressed, ADS has been longer than 0.5 seconds(? or 50% done of adsTime from weapon file), IS NOT swiching weapons, IS NOT throwing nades,
// and finally current weapon IS NOT perk bottle AND syrette.
if(self ADSButtonPressed() && self playerADS() >= 0.5 && !self isSwitchingWeapons() && !self isThrowingGrenade() && (!IsSubStr(currWeap, "zombie_perk_bottle") && currWeap != "syrette"))
{
//DUKIP - My stalker sets all speed scales to speed of 1.5
stalkerSpeedScale = self getStalkerSpeedScale(currWeap);
if(stalkerSpeedScale != self.speedScale && IsDefined(level.zombie_include_weapons[currWeap]))
{
self SetMoveSpeedScale(stalkerSpeedScale);
self.speedScale = stalkerSpeedScale;
//DUKIP - Lower bobbing a bit on scoped weapons.
if(self weaponIsScoped(currWeap))
self SetClientDvars( "bg_bobAmplitudeDucked", "0.002 0.002",
"bg_bobAmplitudeStanding", "0.0025 0.0025");
}
//DUKIP - Since not included, print an error.
if(!IsDefined(level.zombie_include_weapons[currWeap]))
iprintlnbold("Weapon: ^1" + currWeap + "^7 is not an included weapon.");
}
else
{
//DUKIP -
//Reset movement speed back to normal, SetMoveSpeedScale scales the movement speed based on param.
//i.e. zombie_colt = 1 + SetMoveSpeedScale(1) = 1 moveSpeedScale
// ptrs41_zombie = 0.75 + SetMoveSpeedScale(0.75) [from getNormalSpeedScale] = 0.5625 moveSpeedScale
// this is not what we want so, reset it back to original.
self SetClientDvars( "bg_bobAmplitudeDucked", "0.0075 0.0075",
"bg_bobAmplitudeStanding", "0.007 0.007");
self SetMoveSpeedScale(1);
self.speedScale = 1;
}
wait 0.05;
}
}

getStalkerSpeedScale(weapon)
{
speedScale = undefined;
//DUKIP - To get the "Stalker" speed scale to 1.5 or so, divide it by the moveSpeedScale in weapon file.
switch(weapon)
{
case "zombie_colt":
case "zombie_doublebarrel":
case "zombie_mp40":
case "zombie_ppsh":
case "zombie_shotgun":
case "zombie_stg44":
case "zombie_thompson":
case "zombie_type100_smg":
case "m7_launcher_zombie":
case "tesla_gun":
case "zombie_bar":
case "zombie_fg42":
case "ray_gun":
speedScale = 1.5;
break;

case "zombie_gewehr43":
case "zombie_kar98k":
case "zombie_m1carbine":
case "zombie_m1garand":
case "zombie_sw_357":
case "m1garand_gl_zombie":
speedScale = 1.67;
break;

case "zombie_mg42":
case "panzerschrek_zombie":
case "ptrs41_zombie":
case "zombie_30cal":
speedScale = 2;
break;

case "m2_flamethrower_zombie":
speedScale = 2.239;
break;

//DUKIP - Upgraded weapons can be handled differently.
case "zombie_colt_upgraded":
case "zombie_doublebarrel_upgraded":
case "zombie_mp40_upgraded":
case "zombie_ppsh_upgraded":
case "zombie_shotgun_upgraded":
case "zombie_stg44_upgraded":
case "zombie_thompson_upgraded":
case "zombie_type100_smg_upgraded":
case "m7_launcher_zombie_upgraded":
case "tesla_gun_upgraded":
case "zombie_bar_upgraded":
case "zombie_fg42_upgraded":
case "ray_gun_upgraded":
speedScale = 1.5;
break;

case "zombie_gewehr43_upgraded":
case "zombie_kar98k_upgraded":
case "zombie_m1carbine_upgraded":
case "zombie_m1garand_upgraded":
case "zombie_sw_357_upgraded":
case "m1garand_gl_zombie_upgraded":
speedScale = 1.67;
break;

case "zombie_mg42_upgraded":
case "panzerschrek_zombie_upgraded":
case "ptrs41_zombie_upgraded":
case "zombie_30cal_upgraded":
speedScale = 2;
break;

case "m2_flamethrower_zombie_upgraded":
speedScale = 2.239;
break;

default:
iprintlnbold("Weapon: ^1" + weapon + "^7 has no Stalker speedScale.");
speedScale = 1;
break;
}
return speedScale;
}

weaponIsScoped(weapon)
{
hasScope = undefined;

switch(weapon)
{
case "ptrs41_zombie":
case "ptrs41_zombie_upgraded":
hasScope = true;
break;

default:
hasScope = false;
break;
}
return hasScope;
}

//DUKIP - Probably won't be used again, will keep it here for reference.
//Contains missing weapon/bad names.
/*
getNormalSpeedScale(weapon)
{
speedScale = undefined;

if(maps\_zombiemode_weapons::is_weapon_upgraded(weapon))
weapon = GetSubStr(weapon, 0);

switch(weapon)
{
case "zombie_colt":
case "zombie_doublebarrel":
case "zombie_mp40":
case "zombie_ppsh":
case "zombie_shotgun":
case "zombie_stg44":
case "zombie_thompson":
case "zombie_type100_smg":
case "m7_launcher_zombie":
case "tesla_gun":
case "zomibe_bar":
speedScale = 1;
break;

case "zombie_gewehr43":
case "zombie_kar98k":
case "zombie_m1carbine":
case "zombie_m1garand":
case "zombie_sw_357":
case "m1_garand_gl_zombie":
speedScale = 0.9;
break;

case "zombie_mg42":
case "panzerschrek_zombie":
case "ptrs41_zombie":
case "zombie_30cal":
speedScale = 0.75;
break;

case "m2_flamethrower_zombie":
speedScale = 0.67;
break;

default:
ASSERTMSG("Weapon: ^1" + weapon + "^7 has no speedScale in getNormalSpeedScale()");
break;
}
return speedScale;
}*/

Will upload video when I wake up in the morning :D
Last Edit: April 09, 2015, 03:37:22 pm by DidUknowiPwn
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 4 days ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Stalker from MW3? Nice, very nice, if there would be something to add here to not make it almost useless perk, I could do this as an actual perk with machine/bottle/shader included :P
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. https://www.paypal.me/thezombiekilla6
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
Wow, must have missed this when you first made the tutorial. And I guess you still havent woke up since you havent posted video yet :P.

In all serious though, I would love to see this before putting it into my map. May try and make it an actual perk to buy if I like it.
broken avatar :(
×
broken avatar :(
Location: nlThe Netherlands
Date Registered: 23 November 2013
Last active: 2 years ago
Posts
331
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Zombie Slayer Elite
×
Gabrielle's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Gabrielle's Contact & Social LinksTutorialZoneNL
Wow, must have missed this when you first made the tutorial. And I guess you still havent woke up since you havent posted video yet :P.

In all serious though, I would love to see this before putting it into my map. May try and make it an actual perk to buy if I like it.

If you get the perk to work 100%, will you release it? I tried it but not so good with that kind of stuff.
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
If you get the perk to work 100%, will you release it? I tried it but not so good with that kind of stuff.

maybe with the OPs permission
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 7 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
maybe with the OPs permission

Fine by me, I just didn't attempt it because I didn't want to bother making a model for it same with the music and so on.
broken avatar :(
×
broken avatar :(
Location: be
Date Registered: 4 August 2014
Last active: 3 years ago
Posts
224
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
Personal Quote
( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°)
×
MechromancerX's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MechromancerX's Contact & Social Links
It could be combined with quickdraw and called .....  :) ??

Edit: master told me ads times can't be modified through script ... sad  :'(
Last Edit: February 12, 2015, 09:26:26 pm by MechromancerX

 
Loading ...