public void EndClaimList( Mobile from, BaseCreature pet ) { if (pet == null || pet.Deleted || from.Map != this.Map || !from.InRange(this, 14) || !from.HasStabled(pet) || !from.CheckAlive()) return; if ( (from.Followers + pet.ControlSlots) <= from.FollowersMax ) { pet.SetControlMaster( from ); if ( pet.Summoned ) pet.SummonMaster = from; pet.ControlTarget = from; pet.ControlOrder = OrderType.Follow; pet.MoveToWorld( from.Location, from.Map ); pet.IsStabled = false; from.RemoveStabled(pet); SayTo( from, 1042559 ); // Here you go... and good day to you! } else { SayTo( from, 1049612, pet.Name ); // ~1_NAME~ remained in the stables because you have too many followers. } }
public void SummonPet( Mobile from ) { BaseCreature pet = this.Pet; if ( Deleted || pet == null ) return; if ( Charges == 0 ) { SendLocalizedMessageTo( from, 1054122 ); // The Crystal Ball darkens. It must be charged before it can be used again. } else if ( pet is BaseMount && ((BaseMount)pet).Rider == from ) { MessageHelper.SendLocalizedMessageTo( this, from, 1054124, 0x36 ); // The Crystal Ball fills with a yellow mist. Why would you summon your pet while riding it? } else if ( pet.Map == Map.Internal && ( !pet.IsStabled || (from.Followers + pet.ControlSlots) > from.FollowersMax ) ) { MessageHelper.SendLocalizedMessageTo( this, from, 1054125, 0x5 ); // The Crystal Ball fills with a blue mist. Your pet is not responding to the summons. } else if ((!pet.Controled || pet.ControlMaster != from) && !from.HasStabled(pet)) { MessageHelper.SendLocalizedMessageTo( this, from, 1054126, 0x8FD ); // The Crystal Ball fills with a grey mist. You are not the owner of the pet you are attempting to summon. } else if ( !pet.IsBonded ) { MessageHelper.SendLocalizedMessageTo( this, from, 1054127, 0x22 ); // The Crystal Ball fills with a red mist. You appear to have let your bond to your pet deteriorate. } else if ( from.Map == Map.Ilshenar || from.Region is Server.Regions.Jail ) { from.Send( new AsciiMessage( this.Serial, this.ItemID, MessageType.Regular, 0x22, 3, "", "You cannot summon your pet to this location." ) ); } else { Charges--; if ( pet.IsStabled ) { pet.SetControlMaster( from ); if ( pet.Summoned ) pet.SummonMaster = from; pet.ControlTarget = from; pet.ControlOrder = OrderType.Follow; pet.IsStabled = false; from.RemoveStabled(pet); } pet.MoveToWorld( from.Location, from.Map ); MessageHelper.SendLocalizedMessageTo( this, from, 1054128, 0x43 ); // The Crystal Ball fills with a green mist. Your pet has been summoned. } }