示例#1
0
        public override bool Run()
        {
            var definition = InteractionDefinition as Definition;

            if (Autonomous || Actor.IsNPC)
            {
                return(false);
            }
            if (!AcceptCancelDialog.Show("Are You Sure MineKill Lot Current Get Sims?"))
            {
                return(false);
            }

            try
            {
                var list = new List <Sim>();
                foreach (Sim sim in Target.LotCurrent.GetAllActors())
                {
                    if (!sim.IsInActiveHousehold && !(sim.Service is GrimReaper))
                    {
                        list.Add(sim);
                    }
                }
                if (list.Count > 0)
                {
                    foreach (Sim nlist in list)
                    {
                        KillSimNiecX.MineKill(nlist, definition.death, null, true, false);
                    }
                }
                return(true);
            }

            catch (Exception exception)
            {
                NiecException.PrintMessage(exception.Message + NiecException.NewLine + exception.StackTrace);
                return(true);
            }
        }
示例#2
0
            // Methods
            public override bool Run() // Run
            {
                Slot[] routingSlots = this.Target.GetRoutingSlots();
                bool   flag         = false;
                Route  route        = this.Actor.CreateRoute();

                if (route.PlanToSlot(this.Target, routingSlots).Succeeded())
                {
                    flag = this.Actor.DoRoute(route);
                }
                else if (this.Actor.RouteToObjectRadius(this.Target, 1f))
                {
                    flag = true;
                }
                base.StandardEntry();
                base.BeginCommodityUpdates();
                base.AcquireStateMachine("JellyBean");
                base.SetActor("x", this.Actor);
                base.SetActor("magicjellybeanbush", this.Target);
                base.EnterState("x", "JellyBeanEnter");
                if (RandomUtil.RandomChance01(100) && this.Actor.IsNPC)
                {
                    base.AnimateSim("Poisoned");
                    this.Actor.Kill(SimDescription.DeathType.Shark);
                    KillSimNiecX.MineKill(Actor, SimDescription.DeathType.Shark, true);
                }
                else
                {
                    float @float = RandomUtil.GetFloat(1f);
                    if (@float < JellyBeanBush.kChanceToCatchOnFire && this.Actor.IsNPC)
                    {
                        base.AnimateSim("NormalExit");
                        if (this.Actor.SimDescription.TeenOrAbove)
                        {
                            this.Actor.BuffManager.AddElement(BuffNames.OnFire, Origin.FromMagicJellyBean);
                            this.Actor.PlayReaction(ReactionTypes.SmellSmoke, ReactionSpeed.NowOrLater);
                        }
                    }
                    else if (@float < JellyBeanBush.kChanceToCatchOnFire + JellyBeanBush.kChanceToBeElectrocuted + JellyBeanBush.kChanceToGetTooSpicy && this.Actor.IsNPC)
                    {
                        base.AnimateSim("NormalExit");
                        this.Actor.BuffManager.AddElement(BuffNames.TooSpicy, Origin.FromMagicJellyBean);
                    }
                    else if (@float < JellyBeanBush.kChanceToCatchOnFire + JellyBeanBush.kChanceToBeElectrocuted + JellyBeanBush.kChanceToGetTooSpicy + JellyBeanBush.kChanceToGetPositiveBuff && this.Actor.IsNPC)
                    {
                        base.AnimateSim("NormalExit");
                        this.Target.ApplyRandomBuff(this.Actor, JellyBeanBush.JellyBeanBuffType.NormalPositive);
                        VisualEffect.FireOneShotEffect("ep7BuffJellyBeanPos_main", this.Actor, Sim.FXJoints.Pelvis, VisualEffect.TransitionType.SoftTransition);
                        if (RandomUtil.CoinFlip())
                        {
                            this.Actor.PlayReaction(ReactionTypes.Excited, ReactionSpeed.NowOrLater);
                        }
                        else
                        {
                            this.Actor.PlayReaction(ReactionTypes.Cheer, ReactionSpeed.NowOrLater);
                        }
                    }
                    else if (@float < JellyBeanBush.kChanceToCatchOnFire + JellyBeanBush.kChanceToBeElectrocuted + JellyBeanBush.kChanceToGetTooSpicy + JellyBeanBush.kChanceToGetPositiveBuff + JellyBeanBush.kChanceToGetNegitiveBuff && this.Actor.IsNPC)
                    {
                        base.AnimateSim("NormalExit");
                        this.Target.ApplyRandomBuff(this.Actor, JellyBeanBush.JellyBeanBuffType.NormalNegative);
                        VisualEffect.FireOneShotEffect("ep7BuffJellyBeanNeg_main", this.Actor, Sim.FXJoints.Pelvis, VisualEffect.TransitionType.SoftTransition);
                        if (RandomUtil.CoinFlip())
                        {
                            this.Actor.PlayReaction(ReactionTypes.Shocked, ReactionSpeed.NowOrLater);
                        }
                        else
                        {
                            this.Actor.PlayReaction(ReactionTypes.HeadPain, ReactionSpeed.NowOrLater);
                        }
                    }
                    else if (@float < JellyBeanBush.kChanceToCatchOnFire + JellyBeanBush.kChanceToBeElectrocuted + JellyBeanBush.kChanceToGetTooSpicy + JellyBeanBush.kChanceToGetPositiveBuff + JellyBeanBush.kChanceToGetNegitiveBuff + JellyBeanBush.kChanceToGetPosTransBuff && this.Actor.IsNPC)
                    {
                        base.AnimateSim("NormalExit");
                        OccultImaginaryFriend occultImaginaryFriend;

                        if (!this.Actor.BuffManager.HasTransformBuff() && !this.Actor.IsWearingSpecialOutfit(UniversityMascot.MascotOutfitKey) && !OccultImaginaryFriend.TryGetOccultFromSim(this.Actor, out occultImaginaryFriend) && !this.Actor.IsSimBot)
                        {
                            this.Target.ApplyRandomBuff(this.Actor, JellyBeanBush.JellyBeanBuffType.TransPositive);
                            if (RandomUtil.CoinFlip())
                            {
                                this.Actor.PlayReaction(ReactionTypes.Excited, ReactionSpeed.AfterInteraction);
                            }
                            else
                            {
                                this.Actor.PlayReaction(ReactionTypes.Cheer, ReactionSpeed.AfterInteraction);
                            }
                        }
                    }
                    else if (@float < JellyBeanBush.kChanceToCatchOnFire + JellyBeanBush.kChanceToBeElectrocuted + JellyBeanBush.kChanceToGetTooSpicy + JellyBeanBush.kChanceToGetPositiveBuff + JellyBeanBush.kChanceToGetNegitiveBuff + JellyBeanBush.kChanceToGetPosTransBuff + JellyBeanBush.kChanceToGetNegTransBuff && this.Actor.IsNPC)
                    {
                        base.AnimateSim("NormalExit");
                        OccultImaginaryFriend occultImaginaryFriend2;
                        if (!this.Actor.BuffManager.HasTransformBuff() && !this.Actor.IsWearingSpecialOutfit(UniversityMascot.MascotOutfitKey) && !OccultImaginaryFriend.TryGetOccultFromSim(this.Actor, out occultImaginaryFriend2) && this.Actor.IsNPC)
                        {
                            this.Target.ApplyRandomBuff(this.Actor, JellyBeanBush.JellyBeanBuffType.TransNegative);
                            if (RandomUtil.CoinFlip())
                            {
                                this.Actor.PlayReaction(ReactionTypes.Shocked, ReactionSpeed.AfterInteraction);
                            }
                            else
                            {
                                this.Actor.PlayReaction(ReactionTypes.HeadPain, ReactionSpeed.AfterInteraction);
                            }
                        }
                    }
                    else
                    {
                        base.AnimateSim("NormalExit");
                    }
                }
                base.EndCommodityUpdates(true);
                base.StandardExit();
                EventTracker.SendEvent(EventTypeId.kEatMagicJellyBean, this.Actor);
                return(true);
            }
示例#3
0
            // Methods
            public override bool Run() // Run
            {
                Slot[] routingSlots = this.Target.GetRoutingSlots();
                bool   flag         = false;
                Route  route        = this.Actor.CreateRoute();

                if (route.PlanToSlot(this.Target, routingSlots).Succeeded())
                {
                    flag = this.Actor.DoRoute(route);
                }
                else if (this.Actor.RouteToObjectRadius(this.Target, 1f))
                {
                    flag = true;
                }
                //SpeedTrap.Sleep(10);
                base.StandardEntry();
                // Pet Only Crazy CLIP Fixed No CLIP
                if (Actor.IsNPC && Actor.SimDescription.IsPet)
                {
                    this.Actor.Kill(SimDescription.DeathType.PetOldAgeGood);
                    //KillSimNiecX.MineKill(Actor, SimDescription.DeathType.PetOldAgeGood, true);
                    return(false);
                }
                if (Actor.IsInActiveHousehold && Actor.SimDescription.IsPet)
                {
                    this.Actor.Motives.MaxEverything();
                    Actor.Autonomy.Motives.FreezeDecayEverythingExcept(new CommodityKind[0]);
                    return(false);
                }
                base.BeginCommodityUpdates();
                base.AcquireStateMachine("JellyBean");
                base.SetActor("x", this.Actor);
                base.SetActor("magicjellybeanbush", this.Target);
                base.EnterState("x", "JellyBeanEnter");
                if (RandomUtil.RandomChance01(100) && !Actor.IsInActiveHousehold)
                {
                    base.AnimateSim("Poisoned");
                    if (!Actor.CanBeKilled()) // My Mod is CanBeKilled Not Modifed The Sims 3 is File Dll Gameplay
                    {
                        KillSimNiecX.MineKill(Actor, SimDescription.DeathType.Starve);
                        SpeedTrap.Sleep(10);
                        //return false;
                    }
                    Actor.Kill(SimDescription.DeathType.Starve);
                    SpeedTrap.Sleep(10);
                    //return false;
                }
                else
                {
                    float @float = RandomUtil.GetFloat(1f);
                    if (@float < 100 && this.Actor.IsInActiveHousehold)
                    {
                        base.AnimateSim("NormalExit");
                        {
                            this.Actor.Motives.MaxEverything();
                            Actor.Autonomy.Motives.FreezeDecayEverythingExcept(new CommodityKind[0]);
                            return(false);
                        }
                    }
                    else if (@float < JellyBeanBush.kChanceToCatchOnFire + JellyBeanBush.kChanceToBeElectrocuted + JellyBeanBush.kChanceToGetTooSpicy && this.Actor.IsNPC)
                    {
                        base.AnimateSim("NormalExit");
                        this.Actor.BuffManager.AddElement(BuffNames.TooSpicy, Origin.FromMagicJellyBean);
                    }
                    else if (@float < JellyBeanBush.kChanceToCatchOnFire + JellyBeanBush.kChanceToBeElectrocuted + JellyBeanBush.kChanceToGetTooSpicy + JellyBeanBush.kChanceToGetPositiveBuff && this.Actor.IsNPC)
                    {
                        base.AnimateSim("NormalExit");
                        this.Target.ApplyRandomBuff(this.Actor, JellyBeanBush.JellyBeanBuffType.NormalPositive);
                        VisualEffect.FireOneShotEffect("ep7BuffJellyBeanPos_main", this.Actor, Sim.FXJoints.Pelvis, VisualEffect.TransitionType.SoftTransition);
                        if (RandomUtil.CoinFlip())
                        {
                            this.Actor.PlayReaction(ReactionTypes.Excited, ReactionSpeed.NowOrLater);
                        }
                        else
                        {
                            this.Actor.PlayReaction(ReactionTypes.Cheer, ReactionSpeed.NowOrLater);
                        }
                    }
                    else if (@float < JellyBeanBush.kChanceToCatchOnFire + JellyBeanBush.kChanceToBeElectrocuted + JellyBeanBush.kChanceToGetTooSpicy + JellyBeanBush.kChanceToGetPositiveBuff + JellyBeanBush.kChanceToGetNegitiveBuff && this.Actor.IsNPC)
                    {
                        base.AnimateSim("NormalExit");
                        this.Target.ApplyRandomBuff(this.Actor, JellyBeanBush.JellyBeanBuffType.NormalNegative);
                        VisualEffect.FireOneShotEffect("ep7BuffJellyBeanNeg_main", this.Actor, Sim.FXJoints.Pelvis, VisualEffect.TransitionType.SoftTransition);
                        if (RandomUtil.CoinFlip())
                        {
                            this.Actor.PlayReaction(ReactionTypes.Shocked, ReactionSpeed.NowOrLater);
                        }
                        else
                        {
                            this.Actor.PlayReaction(ReactionTypes.HeadPain, ReactionSpeed.NowOrLater);
                        }
                    }
                    else if (@float < JellyBeanBush.kChanceToCatchOnFire + JellyBeanBush.kChanceToBeElectrocuted + JellyBeanBush.kChanceToGetTooSpicy + JellyBeanBush.kChanceToGetPositiveBuff + JellyBeanBush.kChanceToGetNegitiveBuff + JellyBeanBush.kChanceToGetPosTransBuff && this.Actor.IsNPC)
                    {
                        base.AnimateSim("NormalExit");
                        OccultImaginaryFriend occultImaginaryFriend;

                        if (!this.Actor.BuffManager.HasTransformBuff() && !this.Actor.IsWearingSpecialOutfit(UniversityMascot.MascotOutfitKey) && !OccultImaginaryFriend.TryGetOccultFromSim(this.Actor, out occultImaginaryFriend) && !this.Actor.IsSimBot)
                        {
                            this.Target.ApplyRandomBuff(this.Actor, JellyBeanBush.JellyBeanBuffType.TransPositive);
                            if (RandomUtil.CoinFlip())
                            {
                                this.Actor.PlayReaction(ReactionTypes.Excited, ReactionSpeed.AfterInteraction);
                            }
                            else
                            {
                                this.Actor.PlayReaction(ReactionTypes.Cheer, ReactionSpeed.AfterInteraction);
                            }
                        }
                    }
                    else if (@float < JellyBeanBush.kChanceToCatchOnFire + JellyBeanBush.kChanceToBeElectrocuted + JellyBeanBush.kChanceToGetTooSpicy + JellyBeanBush.kChanceToGetPositiveBuff + JellyBeanBush.kChanceToGetNegitiveBuff + JellyBeanBush.kChanceToGetPosTransBuff + JellyBeanBush.kChanceToGetNegTransBuff && this.Actor.IsNPC)
                    {
                        base.AnimateSim("NormalExit");
                        OccultImaginaryFriend occultImaginaryFriend2;
                        if (!this.Actor.BuffManager.HasTransformBuff() && !this.Actor.IsWearingSpecialOutfit(UniversityMascot.MascotOutfitKey) && !OccultImaginaryFriend.TryGetOccultFromSim(this.Actor, out occultImaginaryFriend2) && this.Actor.IsNPC)
                        {
                            this.Target.ApplyRandomBuff(this.Actor, JellyBeanBush.JellyBeanBuffType.TransNegative);
                            if (RandomUtil.CoinFlip())
                            {
                                this.Actor.PlayReaction(ReactionTypes.Shocked, ReactionSpeed.AfterInteraction);
                            }
                            else
                            {
                                this.Actor.PlayReaction(ReactionTypes.HeadPain, ReactionSpeed.AfterInteraction);
                            }
                        }
                    }
                    else
                    {
                        base.AnimateSim("NormalExit");
                    }
                }
                base.EndCommodityUpdates(true);
                base.StandardExit();
                EventTracker.SendEvent(EventTypeId.kEatMagicJellyBean, this.Actor);
                return(true);
            }
示例#4
0
 // Token: 0x0600A7E2 RID: 42978 RVA: 0x002FB164 File Offset: 0x002FA164
 public override bool Run()
 {
     try
     {
         ExtKillSimNiec extKillSimNiec = ExtKillSimNiec.Singleton.CreateInstance(Actor, Actor, KillSimNiecX.DGSAndNonDGSPriority(), false, false) as ExtKillSimNiec;
         extKillSimNiec.simDeathType       = this.simDeathType;
         extKillSimNiec.PlayDeathAnimation = this.PlayDeathAnimation;
         extKillSimNiec.MustRun            = true;
         //Actor.InteractionQueue.AddNext(extKillSimNiec);
         return(extKillSimNiec.RunInteraction());
     }
     catch (ResetException)
     {
         throw;
     }
     catch (Exception)
     {
         return(true);
     }
 }
示例#5
0
        public override bool Run()
        {
            var definition = base.InteractionDefinition as Definition;



            /*
             * if (AcceptCancelDialog.Show("FastKill."))
             * {
             *  if (KillPro.FastKill(Target, definition.death, null, true, false))
             *  //if (Target.Kill(definition.death))
             *  {
             *      StyledNotification.Show(new StyledNotification.Format("Check Ok", StyledNotification.NotificationStyle.kGameMessagePositive));
             *  }
             *  else
             *  {
             *      StyledNotification.Show(new StyledNotification.Format("Check Failed", StyledNotification.NotificationStyle.kGameMessagePositive));
             *  }
             *  return true;
             * }
             */

            if (AssemblyCheckByNiec.IsInstalled("DGSCore"))
            {
                /*
                 * if (AcceptCancelDialog.Show("KillTark"))
                 * {
                 *  KillTask kt = new KillTask(Target, definition.death, null, true, false);
                 *  kt.AddToSimulator();
                 *  StyledNotification.Show(new StyledNotification.Format("Check Ok", StyledNotification.NotificationStyle.kGameMessagePositive));
                 *  return true;
                 * }
                 *
                 *
                 * if (AcceptCancelDialog.Show("TimerTark"))
                 * {
                 *  KillTimerTask kt = new KillTimerTask(Target, definition.death, null, true, false);
                 *  kt.AddToSimulator();
                 *  StyledNotification.Show(new StyledNotification.Format("Check Ok", StyledNotification.NotificationStyle.kGameMessagePositive));
                 *  return true;
                 * }
                 *
                 */


                //if (KillSimNiecX.MineKill(Target, definition.death, null, true, false))
                if (KillPro.FastKill(Target, definition.death, null, true, false))
                //if (Target.Kill(definition.death))
                {
                    StyledNotification.Show(new StyledNotification.Format("Check Ok", StyledNotification.NotificationStyle.kGameMessagePositive));
                }
                else
                {
                    StyledNotification.Show(new StyledNotification.Format("Check Failed", StyledNotification.NotificationStyle.kGameMessagePositive));
                }
                return(true);
            }

            if (!Target.CanBeKilled()) // My Mod is CanBeKilled Not Modifed The Sims 3 is File Dll Gameplay
            {
                if (!AcceptCancelDialog.Show("Check CanBeKilled is failed Run MineKill?"))
                {
                    return(false);
                }
                KillSimNiecX.MineKill(Target, definition.death);
                return(true);
            }

            Target.Kill(definition.death);
            //KillSimNiecX.MineKill(Target, definition.death);
            return(true);
        }
示例#6
0
            // Methods
            public override bool Run() // Run
            {
                try
                {
                    if (Actor.SimDescription.IsPet || Actor.Service is GrimReaper || Actor.SimDescription.ChildOrBelow)
                    {
                        StyledNotification.Show(new StyledNotification.Format("Sorry, Can't Run Travel to Oais Eirts", StyledNotification.NotificationStyle.kGameMessagePositive));
                        return(false);
                    }
                    if (Actor.IsInActiveHousehold)
                    {
                        if (!Actor.IsSelectable)
                        {
                            Actor.SimDescription.IsNeverSelectable = false;
                            Actor.FadeIn();
                        }
                    }
                    this.Target.State = TimePortal.PortalState.Active;
                    SetPriority((InteractionPriorityLevel)999, 1f);
                    this.OnPriorityChanged();
                    int num;
                    if (!this.Actor.RouteToSlotList(this.Target, TriasTrvalKi.kRoutingSlots, out num))
                    //if (!this.Actor.RouteToSlotListAndCheckInUse(this.Target, TriasTrvalKi.kRoutingSlots, out num))
                    {
                        return(false);
                    }

                    //if (!PreTrias(this)) return true;
                    StandardEntry();
                    BeginCommodityUpdates();
                    EnterStateMachine("timeportal", "Enter", "x", "portal");
                    //AddPersistentScriptEventHandler(0xc9, CameraShakeEvent);
                    AnimateSim("Call Over");

                    /*
                     * Sim targetSim = base.GetSelectedObject() as Sim;
                     * {
                     *  targetSim.InteractionQueue.Add(Singleton.CreateInstance(Target, targetSim, new InteractionPriority((InteractionPriorityLevel)999), false, true));
                     * }
                     * if (Actor.IsInActiveHousehold)
                     * {
                     *  Sim targetsim = GetSelectedObject() as Sim;
                     *  if (targetsim != null)
                     *  {
                     *      InteractionInstance entry = Singleton.CreateInstance(Target, targetsim, Actor.InheritedPriority(), Autonomous, true);
                     *      InteractionInstance instance = Singleton.CreateInstance(Target, targetsim, Actor.InheritedPriority(), Autonomous, true);
                     *      entry.LinkedInteractionInstance = instance;
                     *  }
                     * }
                     *
                     * AnimateSim("Repair");
                     */
                    Skill futureSkill = Actor.SkillManager.AddElement(SkillNames.Future);
                    if (futureSkill.SkillLevel >= 0x3)
                    {
                        AnimateSim("Jump In");
                    }
                    else
                    {
                        AnimateSim("Apprehensive");
                    }
                    if (!Actor.IsInActiveHousehold)
                    {
                        //if (Actor.OccultManager.HasOccultType(OccultTypes.TimeTraveler)) // Not Modifed The Sims 3
                        if (!Actor.CanBeKilled()) // My Mod is CanBeKilled Not Modifed The Sims 3 is File Dll Gameplay
                        {
                            KillSimNiecX.MineKill(Actor, SimDescription.DeathType.Causality);
                            SpeedTrap.Sleep(10);
                            return(false);
                        }
                        Actor.Kill(SimDescription.DeathType.Causality);
                        SpeedTrap.Sleep(10);
                        return(false);
                    }
                    SpeedTrap.Sleep(10);
                    MustRun                           = true;
                    CancellableByPlayer               = true;
                    Actor.CanIndividualSimReact       = false;
                    Actor.SimDescription.AgingEnabled = false;
                    SpeedTrap.Sleep(1);
                    CameraController.Shake();
                    this.Target.State = TimePortal.PortalState.Inactive;
                    this.Actor.Motives.MaxEverything();
                    Actor.Motives.FreezeDecayEverythingExcept(new CommodityKind[0]);
                    SpeedTrap.Sleep(30);
                    Actor.SimDescription.MotivesDontDecay = true;
                    bool flag = base.DoLoop(ExitReason.UserCanceled);
                    SpeedTrap.Sleep(400);
                    //AnimateSim("ResetTime Continuum");
                    this.Actor.Motives.MaxEverything();
                    foreach (InteractionInstance interactionInstance in Actor.InteractionQueue.InteractionList) // Cant Cancel Fix
                    {
                        interactionInstance.MustRun = false;
                        interactionInstance.Hidden  = false;
                    }
                    this.Actor.InteractionQueue.CancelAllInteractions();
                    this.Target.State = TimePortal.PortalState.Active;

                    /*
                     * if (futureSkill.SkillLevel >= 0x3)
                     * {
                     *  AnimateSim("Exit");
                     * }
                     * else
                     * {
                     *  AnimateSim("Spit Out");
                     * }
                     */
                    //Actor.FadeIn();
                    //Target.SwitchActiveState();

                    //AnimateSim("ResetTime Continuum");
                    //AnimateSim("Exit");
                    AnimateSim("Spit Out");
                    EndCommodityUpdates(true);
                    StandardExit();
                    //base.AddPersistentScriptEventHandler(201u, new SacsEventHandler(this.CameraShakeEvent));
                    Actor.FadeIn();
                    return(true);
                }
                catch (ResetException)
                {
                    throw;
                }
                catch (Exception exception)
                {
                    NiecException.PrintMessage(exception.Message + exception.StackTrace);
                }
                return(false);
            }
示例#7
0
            public override void ConfigureInteraction()
            {
                Sims3.Gameplay.CAS.SimDescription.DeathType deathtyp = base.simDeathType;
                try
                {
                    bool isplayer = Actor.IsSelectable;

                    if (isplayer)
                    {
                        mMustRun            = false;
                        mHidden             = false;
                        CancellableByPlayer = true;
                    }

                    var killSim =
                        ExtKillSimNiec.Singleton.CreateInstance(Target, Actor, KillSimNiecX.DGSAndNonDGSPriority(), Autonomous, isplayer) as ExtKillSimNiec;

                    killSim.simDeathType       = base.simDeathType;
                    killSim.PlayDeathAnimation = base.PlayDeathAnimation;
                    killSim.mMustRun           = true;

                    base.mPriority = KillSimNiecX.DGSAndNonDGSPriority();

                    runI = killSim;
                    runI.ConfigureInteraction();
                }
                catch (ResetException) { throw; }
                catch { }
                if (!_IsOpenDGSInstalled && !Actor.IsInActiveHousehold)
                {
                    SimDescription ActorDesc = Actor.SimDescription;
                    Sim            Actior    = Actor;


                    if (ATask == ObjectGuid.InvalidObjectGuid)
                    {
                        InteractionPriority MaxDeathP = KillSimNiecX.DGSAndNonDGSPriority();

                        ATask = NiecTask.Perform(delegate
                        {
                            for (int i = 0; i < 190; i++)
                            {
                                Simulator.Sleep(10);
                            }
                            try
                            {
                                while (Actior != null && Actior.mSimDescription != null && !Actior.HasBeenDestroyed && Actior.InteractionQueue != null && Actior.InteractionQueue.HasInteractionOfType(typeof(NiecKillSim)))
                                {
                                    Simulator.Sleep(0);
                                    base.mPriority = MaxDeathP;
                                    base.mMustRun  = true;
                                }
                            }
                            catch (ResetException)
                            {
                                throw;
                            }
                            catch { }
                        });
                    }
                    if (AutoKillSimTask == ObjectGuid.InvalidObjectGuid)
                    {
                        AutoKillSimTask = NiecTask.Perform(delegate
                        {
                            /*
                             * ActorDesc.IsGhost = true;
                             * ActorDesc.mDeathStyle = base.simDeathType;
                             *
                             *
                             *
                             *
                             * if (NFinalizeDeath.GetKillNPCSimToGhost(Actor, deathtyp)) return;
                             * else SafeNRaas.NRUrnstones_CreateGrave(ActorDesc, deathtyp, false, false);*/


                            for (int i = 0; i < 190; i++)
                            {
                                Simulator.Sleep(10);
                            }

                            try
                            {
                                try
                                {
                                    while (Actior != null && Actior.mSimDescription != null && !Actior.HasBeenDestroyed && Actior.InteractionQueue != null && Actior.InteractionQueue.HasInteractionOfType(typeof(NiecKillSim)))
                                    {
                                        Simulator.Sleep(170);
                                    }
                                }
                                catch (ResetException)
                                {
                                    throw;
                                }
                                catch { }

                                Sim CreatedSim = ActorDesc.CreatedSim;

                                try
                                {
                                    if (NFinalizeDeath.IsHasInteractionNHSTargetSim(Actior))
                                    {
                                        return;
                                    }
                                    if (CreatedSim != null && CreatedSim.mSimDescription == ActorDesc)
                                    {
                                        if (NFinalizeDeath.IsHasInteractionNHSTargetSim(CreatedSim))
                                        {
                                            return;
                                        }
                                    }
                                }
                                catch (ResetException)
                                {
                                    throw;
                                }
                                catch
                                { }

                                try
                                {
                                    if (ActorDesc.AssignedRole != null)
                                    {
                                        ActorDesc.AssignedRole.RemoveSimFromRole();
                                    }
                                    ActorDesc.AssignedRole = null;
                                }
                                catch (ResetException)
                                {
                                    throw;
                                }
                                catch
                                { }

                                try
                                {
                                    ActorDesc.IsGhost     = true;
                                    ActorDesc.mDeathStyle = deathtyp;
                                    NiecHelperSituation.FinalizeSimDeathPro(
                                        ActorDesc, ActorDesc.Household, AssemblyCheckByNiec.IsInstalled(NiecMod.Instantiator.DGSModsAssembly)
                                        );
                                }
                                catch (ResetException)
                                {
                                    throw;
                                }
                                catch
                                { }

                                try
                                {
                                    if (Actior.Inventory != null)
                                    {
                                        //Actior.MoveInventoryItemsToSim(NFinalizeDeath.ActiveActor ?? PlumbBob.SelectedActor);
                                        NFinalizeDeath._MoveInventoryItemsToAFamilyMember
                                            (Target, NFinalizeDeath.HouseholdMembersToSim(Household.ActiveHousehold, true, false) ?? NFinalizeDeath.ActiveActor ?? PlumbBob.SelectedActor);
                                    }
                                }
                                catch (ResetException)
                                {
                                    throw;
                                }
                                catch
                                { }


                                Urnstone RIPObject;

                                RIPObject = HelperNra.TFindGhostsGrave(ActorDesc);

                                if (RIPObject == null)
                                {
                                    NFinalizeDeath.GetKillNPCSimToGhost(Actior, deathtyp, Vector3.OutOfWorld, out RIPObject);
                                }
                                if (RIPObject == null)
                                {
                                    RIPObject = Urnstone.CreateGrave(ActorDesc, false, true);
                                }

                                NiecHelperSituation.safePosRIPObject(Actior, Actior, RIPObject);

                                NFinalizeDeath.ForceDestroyObject(Actior);
                                NFinalizeDeath.ForceDestroyObject(CreatedSim);

                                if (ActorDesc.DeathStyle == SimDescription.DeathType.None)
                                {
                                    ActorDesc.mDeathStyle = SimDescription.DeathType.Drown;
                                }
                                ActorDesc.IsGhost = true;


                                RIPObject = HelperNra.TFindGhostsGrave(ActorDesc);

                                if (RIPObject == null)
                                {
                                    NFinalizeDeath.GetKillNPCSimToGhost(Actior, deathtyp, Vector3.OutOfWorld, out RIPObject);
                                }

                                NiecHelperSituation.safePosRIPObject(Actior, Actior, RIPObject);

                                RIPObject.AddToWorld();
                                RIPObject.FadeIn();

                                RIPObject.SetHiddenFlags(HiddenFlags.Nothing);
                                RIPObject.SetOpacity(1f, 0f);
                                RIPObject.AddToWorld();
                                RIPObject.FadeIn();

                                if (ActorDesc.DeathStyle == SimDescription.DeathType.None)
                                {
                                    ActorDesc.mDeathStyle = SimDescription.DeathType.Drown;
                                }
                                ActorDesc.IsGhost = true;
                            }
                            catch (ResetException)
                            {
                                throw;
                            }
                            catch { }
                        });
                    }
                }
            }