public void Handle(Chaos mod, String from, IEnumerable <String> rest) { var timer = mod.Timer("Reduced Gravity", 15); World.GravityLevel = 9.8f / 2; mod.AddUniqueTicker(TickerId.ReducedGravity, new Ticker(timer)); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { var player = Game.Player.Character; if (player == null) { mod.ShowText($"{from} tried to make you skyfall :("); return; } // parameters when in vehicle if (player.CurrentVehicle != null) { player.CurrentVehicle.Delete(); } switch (player.ParachuteState) { case ParachuteState.Deploying: case ParachuteState.Gliding: player.Task.UseParachute(); break; default: break; } var timer = mod.Timer("Skyfall", 20f); player.Weapons.Give(WeaponHash.Parachute, 1, true, true); mod.AddUniqueTicker(TickerId.Skyfall, new SkyfallTicker(player, timer)); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { var duration = rest.GetEnumerator().NextFloatOrDefault(30f); var timer = mod.Timer("Exploding Bullets", duration); mod.AddUniqueTicker(TickerId.ExplodingBullets, new ExplodingBulletsTicker(timer)); mod.ShowText($"{from} enabled exploding bullets!"); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { var duration = rest.GetEnumerator().NextFloatOrDefault(30f); var timer = mod.Timer("Super Swim", duration); mod.AddUniqueTicker(TickerId.SuperSwim, new SuperSwimTicker(timer, 10f)); mod.ShowText($"{from} gave you with super swim for {duration} seconds"); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { var timer = mod.Timer("Time Slowdown", 5f); if (mod.AddUniqueTicker(TickerId.SlowDownTime, new SlowDownTimeTicker(timer))) { Function.Call(Hash.SET_TIME_SCALE, 0.25f); } mod.ShowText($"{from} slowed down time!"); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { var r = rest.GetEnumerator(); var duration = rest.GetEnumerator().NextFloatOrDefault(30f); var player = Game.Player; var timer = mod.Timer("Super Jump", duration); mod.AddUniqueTicker(TickerId.SuperJump, new SuperJumpTicker(timer, player)); mod.ShowText($"{from} gave you with super jump for {duration} seconds"); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { var duration = rest.GetEnumerator().NextFloatOrDefault(30f); var timer = mod.Timer("Super Speed", duration); if (mod.AddUniqueTicker(TickerId.SuperSpeed, new SuperSpeedTicker(timer))) { // NB: in spite of its name, it should only be called once. Game.Player.SetRunSpeedMultThisFrame(10f); } mod.ShowText($"{from} gave you super speed for {duration} seconds"); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { Ped player = Game.Player.Character; if (player == null) { mod.ShowText($"{from} tried to taze you!"); return; } player.Euphoria.Electrocute.Start(3_000); var timer = mod.Timer("Tazing", 3); mod.AddUniqueTicker(TickerId.Electrocuted, timer); mod.ShowText($"{from} tazed you!"); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { Ped player = Game.Player.Character; if (player == null) { mod.ShowText($"{from} tried to make EVERYONE attack you!"); return; } var peds = World.GetNearbyPeds(player.Position, 5000f); var count = 0; foreach (var ped in peds) { if (!ped.Exists() || !ped.IsHuman || !ped.IsAlive || ped == player) { continue; } ped.NeverLeavesGroup = true; ped.RelationshipGroup = mod.HateGroup.GroupId; // var blip = ped.AddBlip(); // mod.AddTicker(new EnemyBlipTicker(blip, ped)); ped.SetCombatAttributes(CombatAttributes.AlwaysFight, true); ped.SetCombatAttributes(CombatAttributes.CanFightArmedPedsWhenNotArmed, true); ped.Task.ClearAll(); ped.Task.FightAgainst(player); count += 1; } if (count == 0) { mod.ShowText($"{from} tried to set pedestrians on you, but there are none :("); return; } var timer = mod.AnonymousTimer(30f); mod.AddUniqueTicker(TickerId.SuppressShocking, new SuppressShockingTicker(timer)); mod.ShowText($"{from} set {count} pedestrians on you!"); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { Ped player = Game.Player.Character; if (player == null) { mod.ShowText($"{from} tried to put you on fire!"); return; } var timer = mod.Timer("On Fire", 5f); if (mod.AddUniqueTicker(TickerId.SetOnFire, new SetOnFireTicker(player, timer))) { player.StartEntityFire(); } mod.ShowText($"{from} put you on fire!"); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { var duration = rest.GetEnumerator().NextFloatOrDefault(30f); var player = Game.Player.Character; if (player == null) { mod.ShowText($"{from} tried to give you invincibility :("); return; } var timer = mod.Timer("Invincibility", duration); if (mod.AddUniqueTicker(TickerId.Invincibility, new InvincibilityTicker(timer, player))) { Game.Player.IsInvincible = true; } mod.ShowText($"{from} gave you invincibility for {duration} seconds!"); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { Ped player = Game.Player.Character; if (player == null) { mod.ShowText($"{from} tried to make you fire proof!"); return; } var duration = rest.GetEnumerator().NextFloatOrDefault(30f); var timer = mod.Timer("Fireproof", duration); if (mod.AddUniqueTicker(TickerId.MakeFireProof, new FireProofTicker(player, timer))) { player.IsFireProof = true; } mod.ShowText($"{from} made you fire proof for {duration} seconds!"); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { var player = Game.Player.Character; var peds = World.GetNearbyPeds(player.Position, 1000f); foreach (var ped in peds) { if (ped == player || !ped.IsHuman || !ped.IsAlive) { continue; } ped.Euphoria.Electrocute.ResetArguments(); ped.Euphoria.Electrocute.Start(3_000 + (int)(mod.Rnd.NextDouble() * 1_000f)); } var timer = mod.Timer("Tazed Others", 3); mod.AddUniqueTicker(TickerId.ElectrocutedOthers, timer); mod.ShowText($"{from} tazed others!"); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { var player = Game.Player.Character; if (player == null) { mod.ShowText($"{from} tried to enable matrix slam :("); return; } var entities = World.GetNearbyEntities(player.Position, 1000f); foreach (var entity in entities) { if (entity == player) { continue; } if (entity is Ped) { var ped = (Ped)entity; mod.AddTicker(ped.Levitate(mod.Rnd, mod.AnonymousTimer(10f))); continue; } if (entity is Vehicle) { var vehicle = (Vehicle)entity; mod.AddTicker(vehicle.Levitate(mod.Rnd, mod.AnonymousTimer(10f))); continue; } } mod.AddUniqueTicker(TickerId.LevitatingEntities, new TimerTicker(mod.Timer("Levitating things", 10f))); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { var player = Game.Player.Character; if (player == null) { mod.ShowText($"{from} tried to enable matrix slam :("); return; } var time = 10f; var extraHeight = 4f; var entity = (Entity)player; float?jitter = null; // parameters when in vehicle if (player.CurrentVehicle != null) { entity = player.CurrentVehicle; extraHeight = 10f + (float)(mod.Rnd.NextDouble() * 5f); } else { time = 7f; player.Euphoria.HighFall.Start(10_000); jitter = 0.05f; extraHeight += (float)(mod.Rnd.NextDouble() * 2f); } var height = entity.Position.Z + extraHeight; var timer = mod.Timer("Levitation", time); mod.AddUniqueTicker(TickerId.Levitation, new LevitateController(timer, entity, height, mod.Rnd, jitter)); mod.ShowText($"{from} caused you to levitate!"); }
public void Handle(Chaos mod, String from, IEnumerable <String> rest) { var player = Game.Player.Character; if (player == null) { return; } float amplitude = 1f; string animationSet = "move_m@drunk@moderatedrunk"; string what = "drunk"; if (veryDrunk) { amplitude = 5f; animationSet = "move_m@drunk@verydrunk"; what = "VERY drunk"; Function.Call(Hash._START_SCREEN_EFFECT, "DrugsDrivingOut", 0, 0); } var timer = mod.Timer(what, 20f); var stumbleTimer = mod.RandomTimer(2f, 5f); if (!WorldExtension.HasAnimationSetLoaded(animationSet)) { WorldExtension.RequestAnimationSet(animationSet); } GameplayCamera.Shake(CameraShake.Drunk, amplitude); player.SetPedIsDrunk(true); player.SetConfigFlag(100, true); player.SetPedMovementClipset(animationSet); mod.AddUniqueTicker(TickerId.Drunk, new DrunkTicker(mod.Rnd, timer, stumbleTimer, player)); mod.ShowText($"{from} made you {what}!"); }