mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-04-19 12:42:54 +00:00
jump_monitor 1.0.0
This commit is contained in:
parent
fdf1a9adba
commit
149fb65b57
@ -69,6 +69,16 @@ Gives perks to a player whenever he spawns if he doesn't already have them.
|
|||||||
This script has been written to give sleight of hand and quickdraw even if you have other perks like overkill (carry two primary weapons).
|
This script has been written to give sleight of hand and quickdraw even if you have other perks like overkill (carry two primary weapons).
|
||||||
You can find the list of perks and pro perks in [perktable.csv](https://github.com/chxseh/MW3-GSC-Dump/blob/e9445976df9f91451fa6e5dc3cb4663390aafcec/_raw-files/mp/perktable.csv)
|
You can find the list of perks and pro perks in [perktable.csv](https://github.com/chxseh/MW3-GSC-Dump/blob/e9445976df9f91451fa6e5dc3cb4663390aafcec/_raw-files/mp/perktable.csv)
|
||||||
|
|
||||||
|
## jump_monitor.gsc
|
||||||
|
|
||||||
|
Whenever players touch the ground they have 7.5s to jump or they will explode. At 50% of this time a beeping sound starts playing.
|
||||||
|
Whenever the player jumps the timer stops and is only starting again from the beginning when he touches the ground.
|
||||||
|
This script is really useful if you have a high jump server and you want to make sure that players don't stay on the ground for too long and also if you have bots it ensures they don't stay on the ground most of the game to make games dynamic.
|
||||||
|
|
||||||
|
Bot Warfare bots are supported but the code for it is disabled by default to avoid getting any error in case Bot Warfare isn't installed.
|
||||||
|
To enable support for Bot Warfare simply uncomment the lines where it says `Uncomment if using Bot Warfare`.
|
||||||
|
This will monitor bots individually and make them jump every `level.jump_monitor_bot_wait_time` second after they touch the ground.
|
||||||
|
|
||||||
## hardcore_tweaks.gsc
|
## hardcore_tweaks.gsc
|
||||||
|
|
||||||
The hardcore mode replaces some game functionalities like enabling friendly fire or disabling killcams.
|
The hardcore mode replaces some game functionalities like enabling friendly fire or disabling killcams.
|
||||||
|
163
small_scripts/jump_monitor.gsc
Normal file
163
small_scripts/jump_monitor.gsc
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
//#include maps\mp\bots\_bot_utility; // Uncomment if using Bot Warfare
|
||||||
|
//#include maps\mp\bots\_bot_internal; // Uncomment if using Bot Warfare
|
||||||
|
#include maps\mp\gametypes\_hud_util;
|
||||||
|
#include common_scripts\utility;
|
||||||
|
#include maps\mp\_utility;
|
||||||
|
|
||||||
|
Init()
|
||||||
|
{
|
||||||
|
InitJumpMonitor();
|
||||||
|
}
|
||||||
|
|
||||||
|
InitJumpMonitor()
|
||||||
|
{
|
||||||
|
level.jump_monitor_is_monitoring = false; // don't touch, this is used to only start the timer after prematch is over
|
||||||
|
level.jump_monitor_bot_wait_time = 3.25;
|
||||||
|
|
||||||
|
level thread OnPlayerConnect();
|
||||||
|
level thread OnPrematchOver();
|
||||||
|
}
|
||||||
|
|
||||||
|
OnPlayerConnect()
|
||||||
|
{
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
level waittill("connected", player);
|
||||||
|
|
||||||
|
player thread OnPlayerSpawned();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
OnPlayerSpawned()
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
self waittill("changed_kit");
|
||||||
|
|
||||||
|
if (!self IsBot() && level.jump_monitor_is_monitoring)
|
||||||
|
{
|
||||||
|
self MonitorPlayerJump();
|
||||||
|
}
|
||||||
|
else if (self IsBot() && level.jump_monitor_is_monitoring)
|
||||||
|
{
|
||||||
|
self thread MonitorBotJump();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MonitorPlayerJump()
|
||||||
|
{
|
||||||
|
self thread MonitorTimer();
|
||||||
|
|
||||||
|
self.pers["ground_status"] = "ground";
|
||||||
|
self notify("is_on_ground");
|
||||||
|
|
||||||
|
self thread MonitorGround();
|
||||||
|
}
|
||||||
|
|
||||||
|
MonitorBotJump()
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
self endon("death");
|
||||||
|
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
wait level.jump_monitor_bot_wait_time;
|
||||||
|
//self thread jump(); // Uncomment if using Bot Warfare
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MonitorTimer()
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
self endon("death");
|
||||||
|
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
groundStatus = self waittill_any_return("is_on_ground", "is_not_on_ground");
|
||||||
|
|
||||||
|
if (groundStatus == "is_on_ground")
|
||||||
|
{
|
||||||
|
self thread JumpTimer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MonitorGround()
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
self endon("death");
|
||||||
|
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (self IsOnGround() && self.pers["ground_status"] != "on_ground")
|
||||||
|
{
|
||||||
|
self.pers["ground_status"] = "on_ground";
|
||||||
|
self notify("is_on_ground");
|
||||||
|
}
|
||||||
|
else if (!self IsOnGround() && self.pers["ground_status"] != "not_on_ground")
|
||||||
|
{
|
||||||
|
self.pers["ground_status"] = "not_on_ground";
|
||||||
|
self notify("is_not_on_ground");
|
||||||
|
}
|
||||||
|
|
||||||
|
wait 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
OnPrematchOver()
|
||||||
|
{
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
level waittill( "prematch_over" );
|
||||||
|
|
||||||
|
level.jump_monitor_is_monitoring = true;
|
||||||
|
|
||||||
|
foreach (player in level.players)
|
||||||
|
{
|
||||||
|
if (!player IsBot() && IsReallyAlive(player))
|
||||||
|
{
|
||||||
|
player MonitorPlayerJump();
|
||||||
|
}
|
||||||
|
else if (player IsBot() && IsReallyAlive(player))
|
||||||
|
{
|
||||||
|
player thread MonitorBotJump();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
JumpTimer()
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
self endon("death");
|
||||||
|
self endon("is_not_on_ground");
|
||||||
|
|
||||||
|
time = 7.5;
|
||||||
|
soundStartTime = (time / 2);
|
||||||
|
tick = 0.25;
|
||||||
|
|
||||||
|
while(time != 0)
|
||||||
|
{
|
||||||
|
wait tick;
|
||||||
|
time -= tick;
|
||||||
|
|
||||||
|
if(time <= (soundStartTime) && time != 0)
|
||||||
|
{
|
||||||
|
self playlocalsound("ui_mp_suitcasebomb_timer");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self playsound("detpack_explo_default");
|
||||||
|
|
||||||
|
playfx(level.c4death, self.origin);
|
||||||
|
|
||||||
|
self suicide();
|
||||||
|
}
|
||||||
|
|
||||||
|
IsBot()
|
||||||
|
{
|
||||||
|
return IsDefined(self.pers["isBot"]) && self.pers["isBot"];
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user