public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(15 * 500);
            AddProgressBar(ReduceCounter);

            this.OnUpdateAsObservable
            .Subscribe(_ =>
            {
                if (core.PlayerPed.IsDead)
                {
                    ParupunteEnd();
                }
            });

            ReduceCounter.OnFinishedAsync.Subscribe(_ =>
            {
                foreach (var ped in allPedList)
                {
                    GTA.World.AddExplosion(ped.Position, GTA.ExplosionType.Grenade, 1.0f, 0.0f);
                    ped.Kill();
                }
                ParupunteEnd();
            });

            var ptfxName = "core";

            if (!Function.Call <bool>(Hash.HAS_NAMED_PTFX_ASSET_LOADED, ptfxName))
            {
                Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, ptfxName);
            }
            Function.Call(Hash._SET_PTFX_ASSET_NEXT_CALL, ptfxName);

            allPedList =
                core.CachedPeds.Where(x => x.IsSafeExist() && !x.IsRequiredForMission() && !x.IsCutsceneOnlyPed())
                .Take(30).ToList();

            var playerPos = core.PlayerPed.Position;
            var num       = 5;

            var i = -allPedList.Count / 2;

            foreach (var p in allPedList.Where(x => x.IsSafeExist()))
            {
                p.Task.ClearAllImmediately();
                p.Position =
                    playerPos
                    + core.PlayerPed.RightVector * 1.5f * (i / num)
                    + core.PlayerPed.ForwardVector * (Math.Abs(i) % num)
                    + core.PlayerPed.ForwardVector;

                if (p.IsSafeExist())
                {
                    AutoReleaseOnParupunteEnd(p);
                    p.Rotation = core.PlayerPed.Rotation;
                    p.Health   = 1;
                    StartCoroutine(DashCoroutine(p));
                    i++;
                }
            }
        }
Exemplo n.º 2
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(15000);
            AddProgressBar(ReduceCounter);


            targetPeds = core.CachedPeds.Where(x => x.IsSafeExist() && x.IsAlive).ToList();

            targetPeds.Add(core.PlayerPed);
            var vehicles = core.CachedVehicles.Where
                               (x => x.IsSafeExist() && x.IsInRangeOf(core.PlayerPed.Position, 300));

            foreach (var vehicle in vehicles)
            {
                vehicle.IsVisible = false;
            }

            if (core.PlayerPed.IsInVehicle())
            {
                core.PlayerPed.CurrentVehicle.IsVisible = false;
                core.PlayerPed.IsVisible = true;
                core.PlayerPed.CurrentVehicle.IsFireProof = true;
            }

            foreach (var ped in targetPeds)
            {
                //コルーチン起動
                ped.IsVisible = true;
                coroutineId   = StartCoroutine(MagicFireCoroutine(ped));
            }
        }
Exemplo n.º 3
0
 public override void OnStart()
 {
     ReduceCounter = new ReduceCounter(20000);
     AddProgressBar(ReduceCounter);
     //コルーチン起動
     coroutineId = StartCoroutine(MagicFireCoroutine());
 }
Exemplo n.º 4
0
        private void StartKosokoso()
        {
            ReduceCounter = new ReduceCounter(25 * 1000);
            AddProgressBar(ReduceCounter);
            ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());

            //戦車を遠目にたくさん配置して、遭遇したら攻撃してくる
            foreach (var i in Enumerable.Range(0, 12))
            {
                //遠目につくる
                var vp = SpawnTank(Random.Next(100, 200));
                if (vp == null)
                {
                    continue;
                }
                var ped = vp.Item2;
                ped.Task.FightAgainst(core.PlayerPed);
                var tank = vp.Item1;
                resources.Add(tank);
                resources.Add(ped);
                tank.EnginePowerMultiplier  = 20.0f;
                tank.EngineTorqueMultiplier = 20.0f;
                tank.MaxSpeed = 300;
            }
        }
Exemplo n.º 5
0
 public override void OnStart()
 {
     GTA.World.Weather = Weather.ThunderStorm;
     ReduceCounter     = new ReduceCounter(15 * 1000);
     AddProgressBar(ReduceCounter);
     ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());
 }
Exemplo n.º 6
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(15000);
            AddProgressBar(ReduceCounter);

            var ptfxName = "core";

            if (!Function.Call <bool>(Hash.HAS_NAMED_PTFX_ASSET_LOADED, ptfxName))
            {
                Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, ptfxName);
            }

            if (AffectAllPed)
            {
                targetPeds = core.CachedPeds.Where(x => x.IsSafeExist() && x.IsAlive).ToList();
            }
            targetPeds.Add(core.PlayerPed);

            //コルーチン起動
            foreach (var ped in targetPeds)
            {
                StartCoroutine(OilCoroutine(ped));
            }

            //終わったら着火する
            ReduceCounter.OnFinishedAsync.Subscribe(_ =>
            {
                foreach (var ped in targetPeds.Where(x => x.IsSafeExist() && x.IsAlive))
                {
                    Ignition(ped);
                }

                ParupunteEnd();
            });
        }
Exemplo n.º 7
0
        private void StartKosokoso()
        {
            ReduceCounter = new ReduceCounter(8 * 1000);
            AddProgressBar(ReduceCounter);
            ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());

            //  core.PlayerPed.IsInvincible = true;
            core.PlayerPed.CurrentVehicle.IsCollisionProof = true;
            //戦車を遠目にたくさん配置して、遭遇したら攻撃してくる
            foreach (var i in Enumerable.Range(0, 2))
            {
                var ppos      = core.PlayerPed.Position;
                var targetPos = (core.PlayerPed.ForwardVector).Normalized();

                var vp = SpawnTank(ppos + targetPos * 10);
                //   if (vp == null) continue;
                var ped = vp.Item2;
                // ped.Task.FightAgainst(core.PlayerPed);
                var tank = vp.Item1;
                resources.Add(tank);
                resources.Add(ped);
                tank.EnginePowerMultiplier  = 20.0f;
                tank.EngineTorqueMultiplier = 20.0f;
                tank.MaxSpeed = 300;
            }
        }
Exemplo n.º 8
0
 public override void OnStart()
 {
     reduceCounter = new ReduceCounter(10000);
     reduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());
     coroutineId = StartCoroutine(HealthRegenCoroutine());
     AddProgressBar(reduceCounter);
 }
 public override void OnStart()
 {
     ReduceCounter = new ReduceCounter(20000);
     ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());
     AddProgressBar(ReduceCounter);
     explodedPedHandles = new HashSet <int>();
 }
Exemplo n.º 10
0
 public override void OnStart()
 {
     ReduceCounter = new ReduceCounter(5000);
     AddProgressBar(ReduceCounter);
     //コルーチン起動
     StartCoroutine(HitohanabiCoroutine());
 }
Exemplo n.º 11
0
 public override void OnStart()
 {
     ReduceCounter = new ReduceCounter(15000);
     ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());
     AddProgressBar(ReduceCounter);
     StartCoroutine(Coroutine());
 }
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(3000);
            AddProgressBar(ReduceCounter);
            ReduceCounter.OnFinishedAsync.Subscribe(_ =>
            {
                hacksList = null;
                ParupunteEnd();
            });

            core.OnDrawingTickAsObservable
            .TakeUntil(OnFinishedAsObservable)
            .Subscribe(_ =>
            {
                foreach (var tuple in drawLineList)
                {
                    var t1 = tuple.Item1;
                    var t2 = tuple.Item2;
                    if (!t1.IsSafeExist() || !t2.IsSafeExist())
                    {
                        continue;
                    }
                    DrawLine(t1.Position, t2.Position, Color.White);
                }
            });

            if (core.PlayerPed.IsInVehicle())
            {
                hacksList.Add(core.PlayerPed.CurrentVehicle);
            }
            StartCoroutine(HackCoroutine(core.PlayerPed));
            StartCoroutine(HackCoroutine(core.PlayerPed));
            StartCoroutine(HackCoroutine(core.PlayerPed));
        }
Exemplo n.º 13
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(20000);
            AddProgressBar(ReduceCounter);

            var ptfxName = "core";

            if (!Function.Call <bool>(Hash.HAS_NAMED_PTFX_ASSET_LOADED, ptfxName))
            {
                Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, ptfxName);
            }
            Function.Call(Hash._SET_PTFX_ASSET_NEXT_CALL, ptfxName);

            foreach (var ped in core.CachedPeds.Where(x => x.IsSafeExist() && x.IsInRangeOf(core.PlayerPed.Position, 100) && x.IsAlive))
            {
                pedList.Add(ped);
                ninjas.Add(ped.Handle);
                ped.Task.ClearAllImmediately();
                StartCoroutine(DashCoroutine(ped));
            }

            ReduceCounter.OnFinishedAsync.Subscribe(_ =>
            {
                foreach (var ped in pedList)
                {
                    if (ped.IsSafeExist())
                    {
                        SetAnimRate(ped, 1);
                        Function.Call(Hash.TASK_FORCE_MOTION_STATE, ped, 0xFFF7E7A4, 0);
                    }
                }

                ParupunteEnd();
            });
        }
Exemplo n.º 14
0
 public override void OnStart()
 {
     ReduceCounter = new ReduceCounter(15 * 1000);
     AddProgressBar(ReduceCounter);
     ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());
     core.PlayerPed.IsInvincible = true;
 }
Exemplo n.º 15
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(15 * 1000);
            ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());
            AddProgressBar(ReduceCounter);
            soundPlayerStart?.Play();

            GameplayCamera.StopShaking();
        }
Exemplo n.º 16
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(15 * 1000);
            AddProgressBar(ReduceCounter);
            ReduceCounter.OnFinishedAsync.Subscribe(_ =>
            {
                ParupunteEnd();
            });

            this.OnUpdateAsObservable
            .Subscribe(_ =>
            {
                var playerPos     = core.PlayerPed.Position;
                var playerVehicle = core.GetPlayerVehicle();


                #region Ped
                foreach (var p in core.CachedPeds.Where(
                             x => x.IsSafeExist() &&
                             !freezedEntities.Contains(x) &&
                             x.IsInRangeOf(playerPos, FreezeRange) &&
                             x.IsAlive &&
                             x != playerVehicle))
                {
                    p.FreezePosition = true;
                    freezedEntities.Add(p);
                }
                #endregion

                #region Vehicle
                foreach (var v in core.CachedVehicles.Where(
                             x => x.IsSafeExist() &&
                             !freezedEntities.Contains(x) &&
                             x.IsInRangeOf(playerPos, FreezeRange) &&
                             x.IsAlive &&
                             x != playerVehicle))
                {
                    v.FreezePosition = true;
                    freezedEntities.Add(v);
                }
                #endregion
            });

            //プレイヤ車両は除外
            core.PlayerVehicle.Where(x => x.IsSafeExist())
            .Subscribe(x => x.FreezePosition = false);

            //終了時に全て解除
            this.OnFinishedAsObservable
            .Subscribe(_ =>
            {
                foreach (var x in freezedEntities.Where(x => x.IsSafeExist()))
                {
                    x.FreezePosition = false;
                }
            });
        }
Exemplo n.º 17
0
 void KottsunStart()
 {
     //ニトロで挟んで圧死させる
     ReduceCounter = new ReduceCounter(3 * 1000);
     AddProgressBar(ReduceCounter);
     ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());
     StartCoroutine(KottsunTankCoroutine(true));
     StartCoroutine(KottsunTankCoroutine(false));
 }
Exemplo n.º 18
0
        public void AddProgressBar(ReduceCounter reduceCounter)
        {
            var prgoressbarData = new ProgressBarData(reduceCounter,
                                                      new Point(0, 15),
                                                      Color.FromArgb(200, 0, 127, 255),
                                                      Color.FromArgb(128, 0, 0, 0),
                                                      DrawType.RightToLeft, 100, 10, 2);

            RegisterProgressBar(prgoressbarData);
            RegisterCounter(reduceCounter);
        }
Exemplo n.º 19
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(15 * 1000);
            AddProgressBar(ReduceCounter);

            ReduceCounter.OnFinishedAsync.Subscribe(_ =>
            {
                ParupunteEnd();
            });

            soundPlayerStart?.Play();
        }
Exemplo n.º 20
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(15 * 1000);
            AddProgressBar(ReduceCounter);
            ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());


            core.PlayerPed.IsExplosionProof = true;
            this.OnFinishedAsObservable
            .Subscribe(_ => core.PlayerPed.IsExplosionProof = false);
            StartCoroutine(KetuCoroutine());
        }
Exemplo n.º 21
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(10 * 1000);

            var dayTime = GTA.World.CurrentDayTime;

            Function.Call(Hash.SET_CLOCK_TIME, 1, dayTime.Minutes, dayTime.Seconds);

            AddProgressBar(ReduceCounter);
            ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());

            StartCoroutine(ElectricalCoroutine());
        }
Exemplo n.º 22
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(20 * 1000);
            AddProgressBar(ReduceCounter);
            ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());

            this.OnFinishedAsObservable.Subscribe(_ =>
            {
                Inferno.InfernoCore.Publish(ChasoModeEvent.SetToDefault);
            });

            Inferno.InfernoCore.Publish(new ChangeWeaponEvent(Weapon.BAT));
        }
Exemplo n.º 23
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(15000);
            AddProgressBar(ReduceCounter);

            var ptfxName = "core";

            if (!Function.Call <bool>(Hash.HAS_NAMED_PTFX_ASSET_LOADED, ptfxName))
            {
                Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, ptfxName);
            }
            Function.Call(Hash._SET_PTFX_ASSET_NEXT_CALL, ptfxName);


            var animDict = "missfam5_yoga";

            Function.Call(Hash.REQUEST_ANIM_DICT, animDict);

            core.PlayerPed.CanRagdoll               = false;
            core.PlayerPed.CanSufferCriticalHits    = false;
            core.PlayerPed.CanPlayGestures          = false;
            core.PlayerPed.CanBeDraggedOutOfVehicle = false;
            core.PlayerPed.BlockPermanentEvents     = false;

            foreach (var ped in core.CachedPeds.Where(x => x.IsSafeExist() && x.IsInRangeOf(core.PlayerPed.Position, 50) && x.IsAlive))
            {
                pedList.Add(ped);
                ninjas.Add(ped.Handle);
                ped.CanPlayGestures = false;
                ped.CanRagdoll      = false;
                StartCoroutine(YogaCoroutine(ped));
            }

            ReduceCounter.OnFinishedAsync.Subscribe(_ =>
            {
                foreach (var ped in pedList)
                {
                    if (ped.IsSafeExist())
                    {
                        SetAnimRate(ped, 1);
                        Function.Call(Hash.TASK_FORCE_MOTION_STATE, ped, 0xFFF7E7A4, 0);
                    }
                    ped.CanPlayGestures = true;
                    ped.CanRagdoll      = true;
                }
                ParupunteEnd();
            });

            soundPlayerStart?.Play();
        }
Exemplo n.º 24
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(15 * 1000);
            core.PlayerPed.IsInvincible = true;
            AddProgressBar(ReduceCounter);

            ReduceCounter.OnFinishedAsync.Subscribe(_ =>
            {
                WaitForSeconds(3.0f);
                core.PlayerPed.IsInvincible = false;
                ParupunteEnd();
            });

            StartCoroutine(ElectricalCoroutine());
        }
Exemplo n.º 25
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(30 * 1000);
            AddProgressBar(ReduceCounter);
            ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());
            var initialModel = core.PlayerPed.Model;

            var hashed      = Enum.GetValues(typeof(PedHash)).Cast <PedHash>().ToArray();
            var targetHash  = hashed[Random.Next(hashed.Length)];
            var targetModel = new Model(targetHash);

            Game.Player.ChangeModel(targetModel);
            this.OnFinishedAsObservable
            .Subscribe(_ => Game.Player.ChangeModel(initialModel));
        }
Exemplo n.º 26
0
        public override void OnStart()
        {
            var ptfxName = "core";

            if (!Function.Call <bool>(Hash.HAS_NAMED_PTFX_ASSET_LOADED, ptfxName))
            {
                Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, ptfxName);
            }

            ReduceCounter = new ReduceCounter(20 * 1000);
            AddProgressBar(ReduceCounter);
            ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());

            //プレイヤ監視
            StartCoroutine(ObservePlayer());
        }
Exemplo n.º 27
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(20 * 1000);
            AddProgressBar(ReduceCounter);
            ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd());

            //プレイヤの着地を監視
            this.OnUpdateAsObservable
            .Select(_ => !core.PlayerPed.IsInAir)
            .DistinctUntilChanged()
            .Where(x => x)
            .Skip(1)
            .Subscribe(_ =>
            {
                StartCoroutine(JumpCoroutine());
            });
        }
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(15 * 1000);
            AddProgressBar(ReduceCounter);
            core.PlayerPed.IsInvincible = true;
            ReduceCounter.OnFinishedAsync.Subscribe(_ =>
            {
                if (core.PlayerPed.IsInVehicle())
                {
                    core.PlayerPed.CurrentVehicle.IsCollisionProof = false;
                    core.PlayerPed.CurrentVehicle.Repair();
                }

                core.PlayerPed.IsInvincible = false;
                ParupunteEnd();
            });

            soundPlayerStart?.Play();
        }
Exemplo n.º 29
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(8000);
            AddProgressBar(ReduceCounter);


            if (AffectAllPed)
            {
                targetPeds = core.CachedPeds.Where(x => x.IsSafeExist() && x.IsAlive).ToList();
            }
            targetPeds.Add(core.PlayerPed);

            foreach (var ped in targetPeds)
            {
                //コルーチン起動
                coroutineId = StartCoroutine(MagicFireCoroutine(ped));
            }
            soundPlayerStart?.Play();
        }
Exemplo n.º 30
0
        public override void OnStart()
        {
            ReduceCounter = new ReduceCounter(15000);
            AddProgressBar(ReduceCounter);

            var ptfxName = "core";

            if (!Function.Call <bool>(Hash.HAS_NAMED_PTFX_ASSET_LOADED, ptfxName))
            {
                Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, ptfxName);
            }
            Function.Call(Hash._SET_PTFX_ASSET_NEXT_CALL, ptfxName);


            foreach (var ped in core.CachedPeds.Where(x => x.IsSafeExist() && x.IsInRangeOf(core.PlayerPed.Position, 30) && x.IsAlive))
            {
                pedList.Add(ped);
                ninjas.Add(ped.Handle);
                ped.CanPlayGestures  = false;
                ped.CanSwitchWeapons = false;
                ped.CanRagdoll       = false;
                StartCoroutine(PlayCoroutine(ped));
            }

            ReduceCounter.OnFinishedAsync.Subscribe(_ =>
            {
                foreach (var ped in pedList)
                {
                    if (ped.IsSafeExist())
                    {
                        SetAnimRate(ped, 1);
                        Function.Call(Hash.TASK_FORCE_MOTION_STATE, ped, 0xFFF7E7A4, 0);
                    }
                    ped.CanPlayGestures  = true;
                    ped.CanSwitchWeapons = true;
                    ped.CanRagdoll       = true;
                }
                ParupunteEnd();
            });

            soundPlayerStart?.Play();
        }