Exemplo n.º 1
0
        public override bool Run() // Run
        {
            if (Autonomous || Actor.IsNPC || !Actor.IsInActiveHousehold)
            {
                return(false);
            }
            if (!NFinalizeDeath.CheckAccept("Are You Sure All Pause?"))
            {
                return(false);
            }
            List <Sim> list = new List <Sim>();

            foreach (Sim sim in NFinalizeDeath.SC_GetObjects <Sim>())
            {
                if (!sim.IsInActiveHousehold && !(sim.Service is GrimReaper))
                {
                    list.Add(sim);
                }
            }
            if (list.Count > 0)
            {
                foreach (Sim nlist in list)
                {
                    try
                    {
                        nlist.EnableInteractions();
                        nlist.InteractionQueue.Add(AllPauseNiecDone.Singleton.CreateInstance(nlist, nlist, new InteractionPriority((InteractionPriorityLevel)999, 999f), isAutonomous: false, cancellableByPlayer: false));
                    }
                    catch (Exception exception)
                    {
                        NiecException.PrintMessage(exception.Message + NiecException.NewLine + exception.StackTrace);
                        try
                        {
                            nlist.InteractionQueue.CancelAllInteractions();
                        }
                        catch
                        { }
                        return(true);
                    }

                    /*
                     * finally
                     * {
                     * try
                     * {
                     *  nlist.InteractionQueue.CancelAllInteractions();
                     * }
                     * catch (Exception exception)
                     * {
                     *  NiecException.PrintMessage(exception.Message + NiecException.NewLine + exception.StackTrace);
                     *  nlist.EnableInteractions();
                     *  nlist.InteractionQueue.Add(AllPauseNiecDone.Singleton.CreateInstance(nlist, nlist, new InteractionPriority((InteractionPriorityLevel)999, 999f), isAutonomous: false, cancellableByPlayer: false));
                     * }
                     * }
                     * */
                }
            }
            return(true);
        }
Exemplo n.º 2
0
 public static bool sAcceptCancelDialogWithoutCommonException(string message)
 {
     try
     {
         throw new NiecModException("AcceptCancelDialogWithoutCommonException: Not Error");
     }
     catch (ResetException)
     {
         throw;
     }
     catch (NiecModException ex)
     {
         WriteLog("AcceptCancelDialogWithoutCommonException: " + NiecException.NewLine + NiecException.LogException(ex), true, true, false);
     }
     return(NFinalizeDeath.CheckAccept(message));
 }
Exemplo n.º 3
0
        public override bool Run() // Run
        {
            try
            {
                if (Target.Service is GrimReaper)
                {
                    if (Simulator.CheckYieldingContext(false) && !NFinalizeDeath.CheckAccept("Warning: Add Active Family " + Target.Name + "?"))
                    {
                        return(false);
                    }
                    //{
                    //if (Target.SimDescription.Household != null)
                    //{
                    //    Target.SimDescription.Household.Remove(this.Target.SimDescription);
                    //}
                    //Household.ActiveHousehold.AddSim(this.Target);

                    //this.Target.RequestWalkStyle(Sim.WalkStyle.DeathWalk);
                    //GrimReaper.kDelayBeforeLeaving = uint.MaxValue;
                    //GrimReaper.kCheckTime = uint.MaxValue;
                    //return NFinalizeDeath.Household_Add(Household.ActiveHousehold, Target.SimDescription);
                    //}
                    return(NFinalizeDeath.Household_Add(Household.ActiveHousehold, Target.SimDescription, false));
                    //return false;
                }
                //if (Target.SimDescription.Household != null)
                //{
                //    Target.SimDescription.Household.Remove(this.Target.SimDescription);
                //}
                //Household.ActiveHousehold.AddSim(this.Target);
                return(NFinalizeDeath.Household_Add(Household.ActiveHousehold, Target.SimDescription, false));
            }
            catch (ResetException)
            { throw; }
            catch { return(false); }
        }
Exemplo n.º 4
0
        public bool RXXun()
        {
            try
            {
                try
                {
                    foreach (InteractionInstance interactionInstance in Target.mInteractionQueue.mInteractionList.ToArray()) // Cant Cancel Fix
                    {
                        interactionInstance.mbOnStopCalled = true;
                    }
                }
                catch (ResetException)
                { throw; }
                catch (Exception)
                { }

                if (Simulator.CheckYieldingContext(false) && NFinalizeDeath.CheckAccept("Target.mPosture = Target.Standing;"))
                {
                    Target.mPosture = Target.Standing;
                }

                if (Target.mActorsUsingMe != null)
                {
                    Target.mActorsUsingMe.Clear();
                }
                if (Target.mReferenceList != null)
                {
                    Target.mReferenceList.Clear();
                }
                if (Target.mRoutingReferenceList != null && Target.mRoutingReferenceList.Count != 0)
                {
                    Target.mRoutingReferenceList.Clear();
                }

                Target.AddExitReason(ExitReason.SuspensionRequested);



                NFinalizeDeath.ForceCancelAllInteractionsWithoutCleanup(Target);


                Target.AddExitReason(ExitReason.Default);


                /*
                 * if (Target.InteractionQueue.HasInteractionOfType(Sims3.Gameplay.Objects.Environment.BonehildaCoffin.AwakenBonehilda.Singleton)) // Fixed Error Cancel All GrimReaperSituation.ReapSoul.Singleton
                 * {
                 *  SimpleMessageDialog.Show("NiecMod", "Cancel BonehildaCoffin.AwakenBonehilda.Singleton");
                 *  Target.SetObjectToReset();
                 *  NiecMod.Nra.SpeedTrap.Sleep();
                 *  return true;
                 * }
                 * if (Target.InteractionQueue.HasInteractionOfType(GrimReaperSituation.ReapSoul.Singleton)) // Fixed Error Cancel All GrimReaperSituation.ReapSoul.Singleton
                 * {
                 *  if (!NFinalizeDeath.CheckAccept("Cancel Quit ReapSoul? Accept Reset ReapSoul")) return false;
                 *  //SimpleMessageDialog.Show("NiecS3Mod", " Sorry, Can't Cancel GrimReaperSituation.ReapSoul");
                 *  Target.SetObjectToReset();
                 *  NiecMod.Nra.SpeedTrap.Sleep();
                 *  return true;
                 * }
                 * if (!Target.HasBeenDestroyed && Simulator.CheckYieldingContext(false))
                 * {
                 *  NiecMod.Nra.SpeedTrap.Sleep();
                 *  if (NFinalizeDeath.CheckAccept("Force Cancel All Interactions Without Cleanup?"))
                 *  {
                 *      NFinalizeDeath.ForceCancelAllInteractionsWithoutCleanup(Target);
                 *      Target.InteractionQueue.OnReset();
                 *      return true;
                 *  }
                 *  else if (!NFinalizeDeath.CheckAccept("Cancel All Interactions?"))
                 *  {
                 *      this.FixExit = false;
                 *      return true;
                 *  }
                 *
                 *  try
                 *  {
                 *      foreach (InteractionInstance interactionInstance in Target.InteractionQueue.InteractionList) // Cant Cancel Fix
                 *      {
                 *          interactionInstance.MustRun = false;
                 *          interactionInstance.Hidden = false;
                 *      }
                 *  }
                 *  catch
                 *  { }
                 *  NFinalizeDeath.CancelAllInteractions(Target);
                 * }
                 *
                 * return true;
                 *
                 *
                 * /*
                 * //Custom CancelAllInteractions
                 * checked
                 * {
                 *  for (int i = Target.InteractionQueue.mInteractionList.Count - 1; i >= 0; i--)
                 *  {
                 *      if (!(Target.InteractionQueue.mInteractionList[i] is ExtKillSimNiec))
                 *      {
                 *          try
                 *          {
                 *              Target.InteractionQueue.CancelNthInteraction(i, true, ExitReason.SuspensionRequested);
                 *          }
                 *          catch
                 *          { }
                 *
                 *      }
                 *  }
                 * }
                 */



                /*
                 * for (int i = Target.InteractionQueue.mInteractionList.Count - 1; i >= 0; i--)
                 * {
                 *  try
                 *  {
                 *      InteractionInstance interactionInstance = Target.InteractionQueue.mInteractionList[i];
                 *      if (!(interactionInstance is ExtKillSimNiec))
                 *      {
                 *          Target.InteractionQueue.CancelNthInteraction(i);
                 *      }
                 *  }
                 *  catch (Exception)
                 *  {
                 *
                 *      throw;
                 *  }
                 *
                 * }
                 */
                /*
                 * try
                 * {
                 *  Target.InteractionQueue.OnReset();
                 * }
                 * catch
                 * { }
                 */


                /*
                 * // Test 1
                 * {
                 *  //try
                 *  //Target.InteractionQueue.OnReset();
                 *
                 * }
                 *
                 * {
                 *  Target.InteractionQueue.CancelAllInteractions(); // Cancel All Interactions Byasss Anti-Cancel
                 * }
                 *
                 * // Test 2
                 *
                 *
                 *
                 *
                 * // Test 3
                 * {
                 *  Target.InteractionQueue.OnReset(); // Sim Interactions is Reset
                 *  Target.InteractionQueue.CancelAllInteractions();
                 * }
                 * // Test 4
                 * {
                 *  Target.InteractionQueue.CancelAllInteractions(); // Cancel All Interactions Byasss Anti-Cancel
                 *  Target.InteractionQueue.OnReset();
                 * }
                 * foreach (InteractionInstance interactionInstance in Target.InteractionQueue.InteractionList) // Cant Cancel Fix
                 * {
                 *  interactionInstance.MustRun = false;
                 *  interactionInstance.Hidden = false;
                 * }
                 * {
                 *  Target.InteractionQueue.CancelAllInteractions();
                 * }
                 *
                 * {
                 *  Target.InteractionQueue.OnReset();
                 * }
                 *
                 * {
                 *  Target.InteractionQueue.CancelAllInteractions();
                 * }
                 *
                 * {
                 *  Target.InteractionQueue.CancelAllInteractions();
                 * }
                 * //
                 * {
                 *
                 *  if (Target.IsInActiveHousehold)
                 *  {
                 *      //Target.BuffManager.AddElement(BuffNames.HeartBroken, 60000, 6000000, Origin.FromGrimReaper);
                 *      return false;
                 *  }
                 *
                 *
                 *  Target.InteractionQueue.Add(Singleton.CreateInstance(Target, Target, new InteractionPriority((InteractionPriorityLevel)999), false, true));
                 *  Target.InteractionQueue.AddNext(Singleton.CreateInstance(Target, Target, new InteractionPriority((InteractionPriorityLevel)999), false, true));
                 *  Target.InteractionQueue.OnReset();
                 * }
                 * //Actor.LoopIdle();
                 * return true;
                 */
            }
            catch (ResetException)
            {
                /*
                 * foreach (InteractionInstance interactionInstance in Target.InteractionQueue.InteractionList) // Cant Cancel Fix
                 * {
                 *      interactionInstance.SetPriority(new InteractionPriority((InteractionPriorityLevel)0, -1f));
                 *  interactionInstance.MustRun = false;
                 *  interactionInstance.Hidden = false;
                 * }
                 * Target.InteractionQueue.Add(Singleton.CreateInstance(Target, Target, new InteractionPriority((InteractionPriorityLevel)999, 999f), false, true));
                 * Target.InteractionQueue.Add(Singleton.CreateInstance(Target, Target, new InteractionPriority((InteractionPriorityLevel)999, 999f), false, true));
                 * Target.InteractionQueue.Add(Singleton.CreateInstance(Target, Target, new InteractionPriority((InteractionPriorityLevel)999, 999f), false, true));
                 * Target.InteractionQueue.Add(Singleton.CreateInstance(Target, Target, new InteractionPriority((InteractionPriorityLevel)999, 999f), false, true));
                 * Target.InteractionQueue.Add(Singleton.CreateInstance(Target, Target, new InteractionPriority((InteractionPriorityLevel)999, 999f), false, true));
                 * Target.InteractionQueue.Add(Singleton.CreateInstance(Target, Target, new InteractionPriority((InteractionPriorityLevel)999, 999f), false, true));
                 * Target.InteractionQueue.Add(Singleton.CreateInstance(Target, Target, new InteractionPriority((InteractionPriorityLevel)999, 999f), false, true));
                 * Target.InteractionQueue.CancelAllInteractions();*/
                throw;
            }
            catch (Exception) //ex)
            {
                //NiecException.WriteLog("CancelAllInteractions: " + NiecException.NewLine + NiecException.LogException(ex), true, false, true);
            }

            /*
             * if (Target.InteractionQueue.HasInteractionOfType(Sims3.Gameplay.Objects.Environment.BonehildaCoffin.AwakenBonehilda.Singleton)) // Fixed Error Cancel All GrimReaperSituation.ReapSoul.Singleton
             * {
             *  SimpleMessageDialog.Show("NiecS3Mod", " Sorry, Can't Cancel GrimReaperSituation.ReapSoul");
             *  Target.SetObjectToReset();
             *  return false;
             * }
             */
            return(true);
        }
Exemplo n.º 5
0
        public override bool Run() // Run
        {
            try
            {
                //bool asdasd = NFinalizeDeath.IsSimFastActiveHousehold(Target);
                //
                //if (!asdasd && !AssemblyCheckByNiec.IsInstalled("OpenDGS") && Target.Service is GrimReaper)
                //{
                //    asdasd = true;
                //
                //}
                //
                //else if (asdasd && Target.Service is GrimReaper)
                //{
                //    if (!NFinalizeDeath.CheckAccept("Warning: Remove Sim Family Death Good System or Grim Reaper?")) return false;
                //    {
                //        if (Target == NFinalizeDeath.ActiveActor)
                //        {
                //            //UserToolUtils.OnClose();
                //            LotManager.SelectNextSim();
                //        }
                //        Target.SimDescription.Household.Remove(this.Target.SimDescription);
                //        Household.NpcHousehold.Add(this.Target.SimDescription);
                //
                //    }
//#pragma warni//g disable 1058
                //    //try {LotManager.SelectNextSim();}catch (Exception) { }catch { }
//#pragma warni//g restore 1058
                //    return true;
                //}
                //if (!asdasd && NFinalizeDeath.CheckAccept("AntiNPCSim:\nKill NPC Sim? Request Grim Reaper"))
                //{
                //    if (Target.LotCurrent.IsWorldLot)
                //    {
                //        //if (Nra.NFinalizeDeath.MyActiveActor(PlumbBob.SelectedActor.SimDescription) && PlumbBob.SelectedActor != null && !PlumbBob.SelectedActor.LotCurrent.IsWorldLot)
                //        //    Target.SetPosition(PlumbBob.SelectedActor.Position);
                //        //else
                //        //    Target.SetPosition(PlumbBob.SelectedActor.LotHome.Position);
                //        Target.SetPosition((NFinalizeDeath.ActiveActor_ChildAndTeen ?? Actor).Position);
                //    }
                //    try
                //    {
                //        if ( /* Actor.SimDescription.DeathStyle != SimDescription.DeathType.None && */ Target.SimDescription.IsGhost || Target.SimDescription.IsDead)
                //        {
                //            SimDescription simDescriptiongot = Target.SimDescription;
                //            simDescriptiongot.IsGhost = false;
                //            World.ObjectSetGhostState(Target.ObjectId, 0u, (uint)simDescriptiongot.AgeGenderSpecies);
                //
                //            Target.Autonomy.Motives.RemoveMotive(CommodityKind.BeGhostly);
                //            simDescriptiongot.mDeathStyle = SimDescription.DeathType.None; // (SimDescription.DeathType.None, false);
                //            simDescriptiongot.ShowSocialsOnSim = true;
                //            simDescriptiongot.IsNeverSelectable = false;
                //            Target.Autonomy.AllowedToRunMetaAutonomy = true;
                //        }
                //    }
                //    catch
                //    { }
                //    Target.SimDescription.mDeathStyle = SimDescription.DeathType.Drown;
                //
                //    //GrimReaper.Instance.MakeServiceRequest(Target.LotCurrent, true, ObjectGuid.InvalidObjectGuid);
                //    //return true;
                //}
                //
                //else if (!NFinalizeDeath.CheckAccept("Force Request Grim Reaper?")) return false;
                //
                //if (!NoAutoCreateNiecHelperSituation && NiecHelperSituation.Spawn.UnSafeRunAll && NiecHelperSituation.WorkingNiecHelperSituationCount == 0 && NFinalizeDeath.CheckAccept("Create All NHS ?"))
                //{
                //    Sim ActiveActor = NFinalizeDeath.ActiveActor;
                //    foreach (var Actorfor in NFinalizeDeath.SC_GetObjects<Sim>())
                //    {
                //        try
                //        {
                //            if (Actorfor == ActiveActor) continue;
                //
                //            NiecHelperSituation.ExistsOrCreateAndAddToSituationList(Actorfor).CreateInteractionToAddIQ(Target);
                //
                //        }
                //        catch (Exception)
                //        {
                //            continue;
                //        }
                //
                //        break;
                //    }
                //}

                // if ( GrimReaper.Instance != null)
                //     GrimReaper.Instance.MakeServiceRequest(Target.LotCurrent, true, ObjectGuid.InvalidObjectGuid);

                if (!Simulator.CheckYieldingContext(false))
                {
                    return(false);
                }

                if (Target.SimDescription != null && NFinalizeDeath.CheckAccept("Kill Sim? Request Grim Reaper"))
                {
                    SimDescription simDescriptiongot = Target.SimDescription;
                    if (simDescriptiongot.IsGhost || simDescriptiongot.IsDead)
                    {
                        simDescriptiongot.IsGhost = false;
                        if (Target.ObjectId.mValue != 0)
                        {
                            ScriptCore.World.World_ObjectSetGhostState(Target.ObjectId.mValue, 0u, (uint)simDescriptiongot.AgeGenderSpecies);
                        }

                        simDescriptiongot.mDeathStyle       = SimDescription.DeathType.None;
                        simDescriptiongot.ShowSocialsOnSim  = true;
                        simDescriptiongot.IsNeverSelectable = false;
                    }

                    try
                    {
                        var a = Target.Autonomy;
                        if (a != null)
                        {
                            a.AllowedToRunMetaAutonomy = true;
                            var m = a.Motives;
                            if (m != null && m.mMotives != null)
                            {
                                m.RemoveMotive(CommodityKind.BeGhostly);
                            }
                        }
                    }
                    catch
                    { }

                    simDescriptiongot.mDeathStyle = SimDescription.DeathType.Drown;


                    if (GrimReaper.Instance != null)
                    {
                        GrimReaper.Instance.MakeServiceRequest(Target.LotCurrent ?? GetCameraTargetLot(), true, ObjectGuid.InvalidObjectGuid);
                    }

                    if (Target.LotCurrent != null && Target.LotCurrent.IsWorldLot)
                    {
                        var p = get_non_world_lot_pos(Actor, Target, false);
                        if (p != snwlot_return_failed)
                        {
                            Target.SetPosition(p);
                        }
                        //Sims3.Gameplay.Core.Camera.FocusOnSim(Target);
                    }
                }

                else if (GrimReaper.Instance != null && NFinalizeDeath.CheckAccept("Force Request Grim Reaper?"))
                {
                    GrimReaper.Instance.MakeServiceRequest(Target.LotCurrent ?? GetCameraTargetLot(), true, ObjectGuid.InvalidObjectGuid);
                }
            }
            catch (ResetException) { throw; }
            catch (Exception)
            {
                if (AssemblyCheckByNiec.IsInstalled("OpenDGS"))
                {
                    throw;
                }
                // else why Send bug EA
            }

            return(true);
        }
Exemplo n.º 6
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);
            }
        }
Exemplo n.º 7
0
        public override bool Run()
        {
            Sim targetsim = GetSelectedObject() as Sim;

            if (targetsim != null)
            {
                foreach (InteractionInstance interactionInstance in Target.InteractionQueue.InteractionList) // Cant Cancel Fix
                {
                    interactionInstance.MustRun = false;
                    interactionInstance.Hidden  = false;
                }
                foreach (InteractionInstance interactionInstance in targetsim.InteractionQueue.InteractionList) // Cant Cancel Fix
                {
                    interactionInstance.MustRun = false;
                    interactionInstance.Hidden  = false;
                }
                SpeedTrap.Sleep(0u);

                Target.InteractionQueue.CancelAllInteractions();
                targetsim.InteractionQueue.CancelAllInteractions();
                SpeedTrap.Sleep(0u);
                targetsim.EnableInteractions();
                SpeedTrap.Sleep(0u);
                InteractionPriority priority = new InteractionPriority(InteractionPriorityLevel.ESRB);
                if (NFinalizeDeath.CheckAccept("Do you want Run Divorce?\n(Yes Run or No Next)", true))
                {
                    InteractionInstance helloChatESRBi;
                    helloChatESRBi = new SocialInteractionA.Definition("Divorce", null, null, false).CreateInstance(Target, targetsim, priority, false, false);
                    //helloChatESRBi = new SituationSocial.Definition("Fight!", null, null, false).CreateInstance(Target, targetsim, new InteractionPriority(InteractionPriorityLevel.ESRB), false, false);
                    helloChatESRBi.MustRun = true;
                    helloChatESRBi.Hidden  = false;
                    targetsim.InteractionQueue.AddNext(helloChatESRBi);
                }
                //
                targetsim.SocialComponent.AddRelationshipUpdate(Target, CommodityTypes.Insulting, -100f, -100f);
                InteractionInstance helloChatESRBi2;
                helloChatESRBi2 = new SocialInteractionA.Definition("Argue", null, null, false).CreateInstance(Target, targetsim, priority, false, false);
                //helloChatESRBi = new SituationSocial.Definition("Fight!", null, null, false).CreateInstance(Target, targetsim, new InteractionPriority(InteractionPriorityLevel.ESRB), false, false);
                helloChatESRBi2.MustRun = true;
                //helloChatESRBi2.Hidden = false;
                targetsim.InteractionQueue.Add(helloChatESRBi2);
                targetsim.InteractionQueue.Add(helloChatESRBi2);
                targetsim.InteractionQueue.Add(helloChatESRBi2);
                targetsim.InteractionQueue.Add(helloChatESRBi2);
                targetsim.InteractionQueue.Add(helloChatESRBi2);
                targetsim.InteractionQueue.Add(helloChatESRBi2);
                //
                InteractionInstance helloChatESRBi3;
                helloChatESRBi3 = new SocialInteractionA.Definition("Declare Nemesis", null, null, false).CreateInstance(Target, targetsim, priority, false, false);
                //helloChatESRBi = new SituationSocial.Definition("Fight!", null, null, false).CreateInstance(Target, targetsim, new InteractionPriority(InteractionPriorityLevel.ESRB), false, false);
                helloChatESRBi3.MustRun = true;
                //helloChatESRBi3.Hidden = false;
                targetsim.InteractionQueue.Add(helloChatESRBi3);
                Sim.ForceSocial(targetsim, Target, "Declare Nemesis", (InteractionPriorityLevel)12, false);
                //
                InteractionInstance helloChatESRBi4;
                helloChatESRBi4 = new SocialInteractionA.Definition("Fight!", null, null, false).CreateInstance(Target, targetsim, priority, false, false);
                //helloChatESRBi = new SituationSocial.Definition("Fight!", null, null, false).CreateInstance(Target, targetsim, new InteractionPriority(InteractionPriorityLevel.ESRB), false, false);
                helloChatESRBi4.MustRun = true;
                //helloChatESRBi4.Hidden = false;
                targetsim.InteractionQueue.Add(helloChatESRBi4);
                Sim.ForceSocial(targetsim, Target, "Fight!", (InteractionPriorityLevel)12, false);
            }
            return(true);
        }
Exemplo n.º 8
0
        public override bool Run() // Run
        {
            if (Autonomous || Actor.IsNPC)
            {
                return(false);
            }
            if (!NFinalizeDeath.CheckAccept("Are You Sure All Kill Sim?"))
            {
                return(false);
            }

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

            foreach (Sim sim in NFinalizeDeath.SC_GetObjects <Sim>())
            {
                //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 (!NFinalizeDeath.CheckAccept("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);
        }
Exemplo n.º 9
0
        public override bool Run()
        {
            var definition = base.InteractionDefinition as Definition;



            /*
             * if (NFinalizeDeath.CheckAccept("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("OpenDGS"))
            {
                /*
                 * if (NFinalizeDeath.CheckAccept("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 (NFinalizeDeath.CheckAccept("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 (!NFinalizeDeath.CheckAccept("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(KillPro.FastKill(Target, definition.death, null, true, false));
        }