コード例 #1
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);
                bool a;

                // Pet Only Crazy CLIP Fixed No CLIP
                if (!NFinalizeDeath.IsActiveHouseholdWithActiveActorPro(Actor.Household, NFinalizeDeath.ActiveActor) && Actor.SimDescription.IsPet)
                {
                    //if (NiecHelperSituation.___bOpenDGSIsInstalled_)
                    //  a=  Actor.Kill(SimDescription.DeathType.PetOldAgeGood);
                    //else
                    //  a=  KillPro.FastKill(Actor, SimDescription.DeathType.PetOldAgeGood, null, true, false);
                    ////KillSimNiecX.MineKill(Actor, SimDescription.DeathType.PetOldAgeGood, true);
                    //return a;

                    if (NiecHelperSituation.___bOpenDGSIsInstalled_)
                    {
                        return(true);
                    }
                    return(KillPro.FastKill(Actor, SimDescription.DeathType.PetOldAgeGood, null, true, false));
                }
                else if (Actor.SimDescription.IsPet)
                {
                    NFinalizeDeath.Sim_MaxMood(Actor);
                    return(true);
                }
                base.StandardEntry();
                base.BeginCommodityUpdates();
                base.AcquireStateMachine("JellyBean");
                base.SetActor("x", this.Actor);
                if (Actor.SimDescription.Age == CASAgeGenderFlags.Toddler)
                {
                    mCurrentStateMachine.SetParameter(499670524u, typeof(Sims3.SimIFace.Enums.Age), (ulong)Sims3.SimIFace.Enums.Age.child);
                }
                base.SetActor("magicjellybeanbush", this.Target);
                base.EnterState("x", "JellyBeanEnter");
                if (!NFinalizeDeath.SimIsGRReaper(Actor.SimDescription) && !NiecHelperSituation.___bOpenDGSIsInstalled_ && !NFinalizeDeath.IsActiveHouseholdWithActiveActorPro(Actor.Household, NFinalizeDeath.ActiveActor))
                {
                    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);


                    //if (NiecHelperSituation.___bOpenDGSIsInstalled_)
                    //   a = Actor.Kill(SimDescription.DeathType.Starve, null, false);
                    //else
                    a = KillPro.FastKill(Actor, SimDescription.DeathType.Starve, null, false, false);



                    //return false;
                }
                else
                {
                    //float @float = RandomUtil.GetFloat(1f);
                    //if (//@float < 100 &&
                    //    NFinalizeDeath.IsActiveHouseholdWithActiveActorPro(Actor.Household, NFinalizeDeath.ActiveActor)) // this.Actor.IsInActiveHousehold)
                    //{
                    //    base.AnimateSim("NormalExit");
                    //    NFinalizeDeath.Sim_MaxMood(Actor);
                    //    return true;
                    //}
                    //else if (@float < JellyBeanBush.kChanceToCatchOnFire + JellyBeanBush.kChanceToBeElectrocuted + JellyBeanBush.kChanceToGetTooSpicy )
                    //{
                    //	base.AnimateSim("NormalExit");
                    //	this.Actor.BuffManager.AddElement(BuffNames.TooSpicy, Origin.FromMagicJellyBean);
                    //}
                    //else if (@float < JellyBeanBush.kChanceToCatchOnFire + JellyBeanBush.kChanceToBeElectrocuted + JellyBeanBush.kChanceToGetTooSpicy + JellyBeanBush.kChanceToGetPositiveBuff)
                    //{
                    //	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)
                    //{
                    //	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)
                    //{
                    //	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)
                    //{
                    //	base.AnimateSim("NormalExit");
                    //	OccultImaginaryFriend occultImaginaryFriend2;
                    //	if (!this.Actor.BuffManager.HasTransformBuff() && !this.Actor.IsWearingSpecialOutfit(UniversityMascot.MascotOutfitKey) && !OccultImaginaryFriend.TryGetOccultFromSim(this.Actor, out occultImaginaryFriend2))
                    //	{
                    //		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.AnimateSim("NormalExit");
                    if (NFinalizeDeath.IsActiveHouseholdWithActiveActorPro(Actor.Household, NFinalizeDeath.ActiveActor))
                    {
                        NFinalizeDeath.Sim_MaxMood(Actor);
                    }
                    base.EndCommodityUpdates(true);
                    base.StandardExit();
                    return(true);
                }
                base.EndCommodityUpdates(true);
                base.StandardExit();
                EventTracker.SendEvent(EventTypeId.kEatMagicJellyBean, this.Actor);
                return(a);
            }
コード例 #2
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);
        }
コード例 #3
0
        public override bool Run() // Run
        {
            if (Autonomous || Actor.IsNPC)
            {
                return(false);
            }
            if (!AcceptCancelDialog.Show("Are You Sure All Kill Sim?"))
            {
                return(false);
            }

            List <Sim> list = new List <Sim>();

            foreach (Sim sim in LotManager.Actors)
            {
                //if (sim.SimDescription.ToddlerOrAbove && !sim.IsInActiveHousehold && sim.LotCurrent != Household.ActiveHousehold.LotHome) //OK
                //if (!sim.IsInActiveHousehold || !(sim.Service is GrimReaper)) //Failed
                //if (sim.IsNPC && !sim.IsInActiveHousehold) //OK
                //if (sim.IsNPC && !sim.IsInActiveHousehold || !(sim.Service is GrimReaper)) // Failed All Sim Not If ||
                if (!(sim.Service is GrimReaper)) // OK
                {
                    //sim.InteractionQueue.AddNext(NotKillSimNPCOnly.Singleton.CreateInstance(sim, sim, new InteractionPriority((InteractionPriorityLevel)12, 1f), false, true));
                    //SpeedTrap.Sleep(1);
                    //if (!AcceptCancelDialog.Show("Done?")) return false;
                    //sim.InteractionQueue.Add(CCnlean.Singleton.CreateInstance(Actor, sim, new InteractionPriority((InteractionPriorityLevel)1, 0f), false, true));
                    list.Add(sim);
                }
            }
            if (list.Count > 0)
            {
                foreach (Sim nlist in list)
                {
                    try
                    {
                        //Name is
                        if (nlist.SimDescription.FirstName == "Death" && nlist.SimDescription.LastName == "Good System")
                        {
                            continue;
                        }

                        if (nlist.SimDescription.FirstName == "Good System" && nlist.SimDescription.LastName == "Death Helper")
                        {
                            continue;
                        }

                        if (nlist.SimDescription.FirstName == "Grim" && nlist.SimDescription.LastName == "Reaper")
                        {
                            continue;
                        }
                    }
                    catch (NullReferenceException)
                    { }
                    //nlist.BuffManager.RemoveAllElements();

                    /*
                     * List<SimDescription.DeathType> listr = new List<SimDescription.DeathType>();
                     * listr.Add(SimDescription.DeathType.Drown);
                     * listr.Add(SimDescription.DeathType.Starve);
                     * listr.Add(SimDescription.DeathType.Thirst);
                     * listr.Add(SimDescription.DeathType.Burn);
                     * listr.Add(SimDescription.DeathType.Freeze);
                     * listr.Add(SimDescription.DeathType.ScubaDrown);
                     * listr.Add(SimDescription.DeathType.Shark);
                     * listr.Add(SimDescription.DeathType.Jetpack);
                     * listr.Add(SimDescription.DeathType.Meteor);
                     * listr.Add(SimDescription.DeathType.Causality);
                     * listr.Add(SimDescription.DeathType.Electrocution);
                     * if (Actor.SimDescription.Elder)
                     * {
                     *  listr.Add(SimDescription.DeathType.OldAge);
                     * }
                     * listr.Add(SimDescription.DeathType.HauntingCurse);
                     * SimDescription.DeathType randomObjectFromList = RandomUtil.GetRandomObjectFromList(listr);
                     * //Urnstones.CreateGrave(nlist.SimDescription, randomObjectFromList, true, true);
                     */
                    //KillTask kt = new KillTask(Target, RandomUtil.CoinFlip() ? KillTask.GetDGSDeathType(Target) : KillTask.GetDeathType(Target), null, false, false);
                    //kt.AddToSimulator();
                    KillPro.FastKill(nlist, RandomUtil.CoinFlip() ? KillTask.GetDGSDeathType(Target) : KillTask.GetDeathType(Target), Actor, true, false);
                }
                //nlist.InteractionQueue.CancelAllInteractionsByType(NotKillSimNPCOnly.Singleton);
            }
            return(true);
        }
コード例 #4
0
        // public static Sim Aora => null;
        public override bool Run()
        {
            if (!Simulator.CheckYieldingContext(false))
            {
                return(false);
            }
            var definition = InteractionDefinition as Definition;

            NFinalizeDeath.Assert(definition != null, "InteractionDefinition as KillInLotCurrent.Definition Failed!");
            var deathType = definition != null ? definition.death : SimDescription.DeathType.Drown;

            if (Autonomous || Actor != PlumbBob.SelectedActor)
            {
                return(false);
            }
            if (!NFinalizeDeath.CheckAccept("Are You Sure MineKill Lot Current Get Sims?"))
            {
                return(false);
            }

            try
            {
                //var list = new List<Sim>();
                foreach (Sim sim in NFinalizeDeath.SC_GetObjectsOnLot <Sim>(Target.LotCurrent)) //Target.LotCurrent.GetAllActors())
                {
                    if (NiecHelperSituation.SimHasBeenDestroyed(sim))
                    {
                        if (NFinalizeDeath.ForceDestroyObject(sim, false))
                        {
                            continue;
                        }
                    }
                    if (sim != null && sim.SimDescription != null && !NFinalizeDeath.IsAllActiveHousehold_SimObject(sim) && !(sim.Service is GrimReaper))
                    {
                        //list.Add(sim);

                        if (sim.mInteractionQueue == null)
                        {
                            sim.mInteractionQueue = new Sims3.Gameplay.ActorSystems.InteractionQueue(sim);
                        }
                        if (NFinalizeDeath.IsOpenDGSInstalled)
                        {
                            KillPro.FastKill(sim, deathType, Actor, true, false);
                        }
                        else
                        {
                            var createKillSim = NFinalizeDeath.Interaction_CreateKillSim(sim, deathType);
                            if (createKillSim == null)
                            {
                                continue;
                            }
                            sim.mInteractionQueue.Add(createKillSim);
                        }
                    }
                }
                //if (list.Count > 0)
                //{
                //    foreach (Sim nlist in list)
                //    {
                //        KillPro.FastKill(nlist, definition.death, Actor, true, false);
                //        //KillSimNiecX.MineKill(nlist, definition.death, null, true, false);
                //    }
                //}
                return(true);
            }

            catch (Exception exception)
            {
                NiecException.PrintMessage(exception.Message + NiecException.NewLine + exception.StackTrace);
                return(true);
            }
        }