protected override void OnTarget(Mobile from, object obj) { IEvoCreature evo = obj as IEvoCreature; BaseCreature c = obj as BaseCreature; if (!from.Alive) { from.SendMessage("You may not do that while dead."); } else if (null == evo || null == c) { from.SendMessage("That is not an Evo creature!"); } else if (from.AccessLevel == AccessLevel.Player && (c.Controlled == false || c.ControlMaster != from)) { from.SendMessage("You do not control that creature!"); } else { c.PublicOverheadMessage(MessageType.Regular, c.SpeechHue, true, c.Name + " has " + evo.Ep + " experience points.", false); } }
public PregnancyTimer(IEvoCreature female) : base(female.RemainingTerm) { Priority = TimerPriority.OneMinute; Start(); m_Evo = female; }
public void Hatch(Mobile from) { IEvoCreature evo = GetEvoCreature(); if (null != evo) { BaseEvoSpec spec = GetEvoSpec(evo); BaseCreature creature = evo as BaseCreature; if (null != spec && null != spec.Stages && !creature.Deleted) { if (spec.Tamable && spec.MinTamingToHatch > from.Skills[SkillName.AnimalTaming].Value) { from.SendMessage("A minimum animal taming skill of {0} is required to hatch this egg.", spec.Stages[0].MinTameSkill); creature.Delete(); } else if (from.FollowersMax - from.Followers < spec.Stages[0].ControlSlots) { from.SendMessage("You have too many followers to hatch this egg."); creature.Delete(); } else { creature.Controlled = true; creature.ControlMaster = from; creature.IsBonded = true; creature.MoveToWorld(from.Location, from.Map); creature.ControlOrder = OrderType.Follow; Delete(); from.SendMessage("You are now the proud owner of " + creature.Name + "!"); } } } }
private void PreloadProperties() { if (null == m_Pet) { return; } m_IsBonded = m_Pet.IsBonded; m_Name = m_Pet.Name; m_Gender = (m_Pet.Female ? "Female" : "Male"); m_Breed = Xanthos.Utilities.Misc.GetFriendlyClassName(m_Pet.GetType().Name); m_RawStr = m_Pet.RawStr; m_RawDex = m_Pet.RawDex; m_RawInt = m_Pet.RawInt; m_Wrestling = m_Pet.Skills[SkillName.Wrestling].Base; m_Tactics = m_Pet.Skills[SkillName.Tactics].Base; m_Anatomy = m_Pet.Skills[SkillName.Anatomy].Base; m_Poisoning = m_Pet.Skills[SkillName.Poisoning].Base; m_Magery = m_Pet.Skills[SkillName.Magery].Base; m_EvalInt = m_Pet.Skills[SkillName.EvalInt].Base; m_MagicResist = m_Pet.Skills[SkillName.MagicResist].Base; m_Meditation = m_Pet.Skills[SkillName.Meditation].Base; m_Parry = m_Pet.Skills[SkillName.Parry].Base; m_Archery = m_Pet.Skills[SkillName.Archery].Base; m_Fencing = m_Pet.Skills[SkillName.Fencing].Base; m_Swords = m_Pet.Skills[SkillName.Swords].Base; m_Macing = m_Pet.Skills[SkillName.Macing].Base; IEvoCreature evo = m_Pet as IEvoCreature; if (null != evo) { m_EvoEp = evo.Ep; m_EvoStage = evo.Stage; } m_PropsLoaded = true; }
protected override void OnTarget(Mobile from, object target) { if (target is BaseCreature && target is IEvoCreature) { IEvoCreature mob = (IEvoCreature)target; BaseCreature creature = (BaseCreature)target; if (creature.Controlled && creature.ControlMaster == from) { mob.Ep += m_Deed.Points; m_Deed.Consume(); // Delete the evo deed from.SendMessage("Your pet consumes the food and gain 1 million EP!"); if (mob.Stage < mob.FinalStage && mob.Ep >= mob.NextEpThreshold) { mob.Evolve(false); } } } else { from.SendMessage("You must feed an evolution creature."); } }
public MatingGump( Mobile from, Mobile mobile, IEvoCreature female, IEvoCreature male ) : base( 25, 50 ) { Closable = Dragable = false; m_From = from; m_Mobile = mobile; m_Female = female; m_Male = male; AddPage( 0 ); AddBackground( 25, 10, 420, 200, 5054 ); AddImageTiled( 33, 20, 401, 181, 2624 ); AddAlphaRegion( 33, 20, 401, 181 ); AddLabel( 125, 148, 1152, m_From.Name +" would like to mate "+ ((BaseCreature)m_Female).Name +" with" ); AddLabel( 125, 158, 1152, ((BaseCreature)m_Male).Name +"." ); AddButton( 100, 50, 4005, 4007, 1, GumpButtonType.Reply, 0 ); AddLabel( 130, 50, 1152, "Allow them to mate." ); AddButton( 100, 75, 4005, 4007, 0, GumpButtonType.Reply, 0 ); AddLabel( 130, 75, 1152, "Do not allow them to mate." ); }
public MatingGump(Mobile from, Mobile mobile, IEvoCreature female, IEvoCreature male) : base(25, 50) { Closable = Dragable = false; m_From = from; m_Mobile = mobile; m_Female = female; m_Male = male; AddPage(0); AddBackground(25, 10, 420, 200, 5054); AddImageTiled(33, 20, 401, 181, 2624); AddAlphaRegion(33, 20, 401, 181); AddLabel(125, 148, 1152, m_From.Name + " would like to mate " + ((BaseCreature)m_Female).Name + " with"); AddLabel(125, 158, 1152, ((BaseCreature)m_Male).Name + "."); AddButton(100, 50, 4005, 4007, 1, GumpButtonType.Reply, 0); AddLabel(130, 50, 1152, "Allow them to mate."); AddButton(100, 75, 4005, 4007, 0, GumpButtonType.Reply, 0); AddLabel(130, 75, 1152, "Do not allow them to mate."); }
public PregnancyTimer( IEvoCreature female ) : base( female.RemainingTerm ) { Priority = TimerPriority.OneMinute; Start(); m_Evo = female; }
// Reflection is used since the class type could be either // BaseEvo or BaseMountEvo. public static BaseEvoSpec GetEvoSpec(IEvoCreature evo) { return(Xanthos.Utilities.Misc.InvokeParameterlessMethod(evo, "GetEvoSpec") as BaseEvoSpec); }
// Reflection is used since the class type could be either // BaseEvo or BaseMountEvo. public static BaseEvoSpec GetEvoSpec( IEvoCreature evo ) { return Xanthos.Utilities.Misc.InvokeParameterlessMethod( evo, "GetEvoSpec" ) as BaseEvoSpec; }