RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.0 RC2]Jako Leveling System (Balanced Pet Leveling)

Thilgon

Sorceror
Hi Jerbal :)
I really like this system, and planning to use it on my shard...
However, i got a little problem...
That is: i've noticed that if an animal has 2 different types for male and female (ex: bull and cow), you can have male cows and females bulls, and you have to mate 2 bulls together, or 2 cows...
To solve this, i'm creating an unified animal for male and females, that, depending on the sex, would change name and attributes... but i found a big problem: the sex of the pet is determined after it is tamed, or as it is spawned? seems to me it is determined on tame...
how could i set that cows are always female, while bulls are always male?


maybe solved...
in the constructor, i added:
Code:
			if ( Female = Utility.RandomBool() )
			{
				Name = "a cow";
                         [rest of the code here]
                        }
			else
			{
				Name = "a bull";
                        [rest of the code here]
                        }

*seems* to work fine, on 20 they got the right sex, i'll make further tests...
 

Jerbal

Sorceror
In the bull file constructor add:
Code:
Female=false;

in the cow constructor add:
Code:
Female=true;


Done! :)
 

Thilgon

Sorceror
thanks :)
i think it's almost the same thing i did, but my way to get a new bred cow or bull, i can mate a bull and a cow together :)

i'll keep your suggestion anyway to make unmateable pets, that cames only in one sex :p
 

Jerbal

Sorceror
But I think this adds complexity to the actual taming and I don't remember if I 'fixed' this or put in a way to 'fix' it. The way you listed it is probably the best way to do it, but I'm pretty sure I realized that this type of thing existed and have a way to mate them.
 

Thilgon

Sorceror
Code:
using System; 
using System.Collections; 
using Server.Misc; 
using Server.Items; 
using Server.Mobiles; 
using Server;
using Server.Network;

namespace Server.Mobiles 
{ 
	public class BaseBovino : BaseCreature
	{ 

		public BaseBovino(AIType ai, FightMode fm, int PR, int FR, double AS, double PS) : base( ai, fm, PR, FR, AS, PS )
		{
		}
		
		public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
		public override int Meat{ get{ return 8; } }
		public override int Hides{ get{ return 4; } }
		
		public override void OnCarve( Mobile from, Corpse corpse, Item item )
		{
			base.OnCarve( from, corpse, item );

			corpse.DropItem( new BeefHock( 3 ) );
		}

		public BaseBovino( Serial serial ) : base( serial ) 
		{ 
		} 

		public override void Serialize( GenericWriter writer ) 
		{ 
			base.Serialize( writer ); 

			writer.Write( (int) 0 ); // version 
		} 

		public override void Deserialize( GenericReader reader ) 
		{ 
			base.Deserialize( reader ); 

			int version = reader.ReadInt(); 
		} 
	}
	
	
	/* Albini */
	[CorpseName( "il corpo di un bovino" )]
	public class BovinoAlbino : BaseBovino
	{ 
		[Constructable] 
		public BovinoAlbino() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 ) 
		{ 
			Hue = 2960;
			
			if ( Utility.Random( 1000 ) == 0 ) // 0.1% chance to have mad cows
				FightMode = FightMode.Closest;
			
			if ( Female = Utility.RandomBool() )
			{
				Name = "una vacca albina"; // cow, female
				Body = Utility.RandomList( 0xD8, 0xE7 );
				BaseSoundID = 0x78;
				
				SetStr( 30 );
				SetDex( 15 );
				SetInt( 5 );

				SetHits( 20, 25 );
				SetMana( 0 );

				SetDamage( 1, 4 );

				SetDamageType( ResistanceType.Physical, 100 );

				SetResistance( ResistanceType.Physical, 5, 15 );

				SetSkill( SkillName.MagicResist, 20.0 );
				SetSkill( SkillName.Tactics, 10.0 );
				SetSkill( SkillName.Wrestling, 10.5 );

				Fame = 200;
				Karma = 0;

				VirtualArmor = 10;
	
				Tamable = true;
				ControlSlots = 1;
				MinTameSkill = 30.1;
			}
			
			else
			{
				Name = "un toro albino"; // bull, male
				Body = Utility.RandomList( 0xE8, 0xE9 );
				BaseSoundID = 0x64;
		
				SetStr( 77, 111 );
				SetDex( 56, 75 );
				SetInt( 47, 75 );
				
				SetHits( 55, 69 );
				SetMana( 0 );
				
				SetDamage( 4, 9 );
				
				SetDamageType( ResistanceType.Physical, 100 );
				SetResistance( ResistanceType.Physical, 25, 30 );
				SetResistance( ResistanceType.Cold, 10, 15 );
				
				SetSkill( SkillName.MagicResist, 17.6, 25.0 );
				SetSkill( SkillName.Tactics, 67.6, 85.0 );
				SetSkill( SkillName.Wrestling, 40.1, 57.5 );
				
				Fame = 600;
				Karma = 0;
				VirtualArmor = 28;
				
				Tamable = true;
				ControlSlots = 1;
				MinTameSkill = 70.1;
			}
		}
		
		public override void OnDoubleClick( Mobile from )
		{
			base.OnDoubleClick( from );

			int random = Utility.Random( 100 );

			if ( random < 5 )
				Tip();
			else if ( random < 20 )
				PlaySound( 120 );
			else if ( random < 40 )
				PlaySound( 121 );
		}

		public void Tip()
		{
			PlaySound( 121 );
			Animate( 8, 0, 3, true, false, 0 );
		}


		public BovinoAlbino ( Serial serial ) : base( serial ) 
		{ 
		} 

		public override void Serialize( GenericWriter writer ) 
		{ 
			base.Serialize( writer ); 

			writer.Write( (int) 0 ); // version 
		} 

		public override void Deserialize( GenericReader reader ) 
		{ 
			base.Deserialize( reader ); 

			int version = reader.ReadInt(); 
		} 
	}

that's one of my "cattle"... as you can see i made a base class for the single kind of creature, wich holds anything those creatures might have in common, then made the single script for the specific kind (we are making many subspecies of animals, about cows and bulls i'm making 6 different kinds :p)...

i think this way i might solve either the mating problem and the creature sex issue, so i get a bull and a cow to the breeder, they are the same kind of creature, just of different sex, and anything is fine... i suppose :p
 

Jerbal

Sorceror
Because of the line in JakoBreeder.cs:
Code:
            if (bc1.GetType() != bc2.GetType())
                return "That seems complicated.";


That's where your 'problem' is coming from. The easiest fix would be create a variable that is a Type in BaseCreature that will allow two different creatures to mate.


Code:
public Type JakoCanMateWith = null

in bull constructor:
Code:
JakoCanMateWith = Typeof(cow);

in cow:
Code:
JAkoCanMateWith = typeof(bull);

in JakoBreeder.cs, replace:
Code:
            if (bc1.GetType() != bc2.GetType())
                return "That seems complicated.";
with:
Code:
            if (bc1.GetType() != bc2.GetType() && bc1.JakoCanMateWith != bc2.GetType() && bc1.GetType() != bc2.JakoCanMateWith)
                return "That seems complicated.";

In JakoBreeder, in function OnDragDrop:

under:
Code:
                if (bt.Creature.Female)
                {

Add:
Code:
                    Type cre = bt.Creature.GetType();
                    if (bt.Creature is BaseCreature && ((BaseCreature)bt.Creature).JakoCanBreedWith != null)
                        cre = (Utility.RandomBool() ? bt.Creature.GetType() : ((BaseCreature)bt.Creature).JakoCanBreedWith);

In JakoBreeder.cs Replace:
Code:
BaseCreature baby1 = Activator.CreateInstance(bt.Creature.GetType()) as BaseCreature;
With:
Code:
BaseCreature baby1 = Activator.CreateInstance(cre) as BaseCreature;

In JakoBreeder.cs Replace:
Code:
BaseCreature baby2 = Activator.CreateInstance(bt.Creature.GetType()) as BaseCreature;
With:
Code:
BaseCreature baby2 = Activator.CreateInstance(cre) as BaseCreature;


I didn't test any of this code... but in theory it should fix all your woes for male->Female, but NOT different TYPES of bulls with each other.
 

Thilgon

Sorceror
probably won't work because of
Code:
           if (bc1.GetType() != bc2.GetType() && bc1.JakoCanMateWith != bc2.GetType() && bc1.GetType() != bc2.JakoCanMateWith)
                return "That seems complicated.";
it states that IF the creatures are different AND the canmatewith is different, they can't mate...
BUT, since the creature type is different, it won't check if the JakoCanMateWith is of the correct type...

Code:
 if ( ( bc1.GetType() != bc2.GetType() ) || ( bc1.JakoCanMateWith != bc2.GetType() && bc1.GetType() != bc2.JakoCanMateWith) )
                return "That seems complicated.";
not sure, but this way could probably work...

is there a way to control what cames from the bred? (haven't checked the code deeply yet, but, i.e.: i want a dog be able to mate with a dire wolf, and the result be a custom creature that seems like a timber wolf and is called "wolfdog" or something like that...)
yeah, crossbreeding XD
one could breed and train new varieties of creature by crossbreeding them (out of my mind, a drake and a wyvern (!) could mate together and a new species be born, as a poisonus drake or red wyvern, or... a demon and a woman (like, slave human pet) could mate and born a succubus (yeah, this is going to get wicked XD) )

i've checked now the JakoBreeder, and i've seen it just says that the baby is the same type of the mother...
this is the code trunk to modify, i guess...
Code:
                if (bt.Creature.Female)
                {
                    BaseCreature baby1 = Activator.CreateInstance(bt.Creature.GetType()) as BaseCreature;
                    baby1.MaxLevel = (uint)Math.Ceiling((double)((((BaseCreature)bt.Creature).Level + ((BaseCreature)bt.OtherCreature).Level) / 2) + 1);
                    from.SendMessage("Adding Baby ticket to bank");
                    from.BankBox.AddItem(new BreedingParentTicket(bt.Owner, bt.OtherParent, baby1, DateTime.MinValue));
                    if (bt.Twins)
                    {
                        BaseCreature baby2 = Activator.CreateInstance(bt.Creature.GetType()) as BaseCreature;
                        baby2.Female = baby1.Female;
                        baby2.MaxLevel = baby1.MaxLevel;
                        bt.Owner.SendMessage("Congradulations, your pet has just had twins! The father of the child has received the additional ticket.");
                        if (bt.Owner != bt.OtherParent)
                            bt.OtherParent.SendMessage(" Good news, it's twins! {0} has just recieved the second baby. Your ticket to redeem has been placed in your bank.", bt.Owner.Name);
                        bt.OtherParent.BankBox.AddItem(new BreedingParentTicket(bt.OtherParent, bt.Owner, baby2, DateTime.MinValue));
                    }
                }
i would probably have to add a new overridable props on basecreature, in the jako sections, call it crossbreed, and somewhere (the creature script? jakobreeder itself?) add an if (if male is X and female is Y, then this results as a crossbreed as Z (with high failure percentage) )..

do you think this could be possible, or i'm wasting my time? :)

edit
i thought that the easiest way to set the crossbreed would be adding another file, wich olds all the different combinations that can be done, to be customized by who uses this system with the crossbreed enabled...
something like
if Female && typeof(drake)
{ if Male is typeof(wyvern)
{Creature == typeof(PoisonousDragon)}}

if Female && typeof(WarHorse)
{ if Male is typeof(PackHorse)
{ Creature == typeof(PackWarHorse) }
elseif Male is typeof(Nightmare)
{ Creature == typeof(Incubus) }}

and so on... this would be called in the baby result with a low (less then 50%) chance only if crossbreeding would be enabled and they get the correct type of creature to be bred, otherwhise they would end up with the simple version of one of the 2 parents...
haven't scripted anything yet, but... this might interest you for this system?
 

Jerbal

Sorceror
Thilgon;805170 said:
probably won't work because of
Code:
           if (bc1.GetType() != bc2.GetType() && bc1.JakoCanMateWith != bc2.GetType() && bc1.GetType() != bc2.JakoCanMateWith)
                return "That seems complicated.";
it states that IF the creatures are different AND the canmatewith is different, they can't mate...
BUT, since the creature type is different, it won't check if the JakoCanMateWith is of the correct type...

Code:
 if ( ( bc1.GetType() != bc2.GetType() ) || ( bc1.JakoCanMateWith != bc2.GetType() && bc1.GetType() != bc2.JakoCanMateWith) )
                return "That seems complicated.";
not sure, but this way could probably work...

No, my code is correct. If the creatures are different, and NOT 'can mate-able' (aka, not the optional segment), then they can't be mated with. Your code would always return that it can't be mated with if they were JakoCanMateWith as they will be different types first off and therefore true.
Ex: Type1 = Cow, Type2 = Bull
bc1 != bc2, return true: (That seems Complicated.)

Thilgon;805170 said:
is there a way to control what cames from the bred? (haven't checked the code deeply yet, but, i.e.: i want a dog be able to mate with a dire wolf, and the result be a custom creature that seems like a timber wolf and is called "wolfdog" or something like that...)
yeah, crossbreeding XD
one could breed and train new varieties of creature by crossbreeding them (out of my mind, a drake and a wyvern (!) could mate together and a new species be born, as a poisonus drake or red wyvern, or... a demon and a woman (like, slave human pet) could mate and born a succubus (yeah, this is going to get wicked XD) )

i've checked now the JakoBreeder, and i've seen it just says that the baby is the same type of the mother...
this is the code trunk to modify, i guess...
Code:
                if (bt.Creature.Female)
                {
                    BaseCreature baby1 = Activator.CreateInstance(bt.Creature.GetType()) as BaseCreature;
                    baby1.MaxLevel = (uint)Math.Ceiling((double)((((BaseCreature)bt.Creature).Level + ((BaseCreature)bt.OtherCreature).Level) / 2) + 1);
                    from.SendMessage("Adding Baby ticket to bank");
                    from.BankBox.AddItem(new BreedingParentTicket(bt.Owner, bt.OtherParent, baby1, DateTime.MinValue));
                    if (bt.Twins)
                    {
                        BaseCreature baby2 = Activator.CreateInstance(bt.Creature.GetType()) as BaseCreature;
                        baby2.Female = baby1.Female;
                        baby2.MaxLevel = baby1.MaxLevel;
                        bt.Owner.SendMessage("Congradulations, your pet has just had twins! The father of the child has received the additional ticket.");
                        if (bt.Owner != bt.OtherParent)
                            bt.OtherParent.SendMessage(" Good news, it's twins! {0} has just recieved the second baby. Your ticket to redeem has been placed in your bank.", bt.Owner.Name);
                        bt.OtherParent.BankBox.AddItem(new BreedingParentTicket(bt.OtherParent, bt.Owner, baby2, DateTime.MinValue));
                    }
                }
i would probably have to add a new overridable props on basecreature, in the jako sections, call it crossbreed, and somewhere (the creature script? jakobreeder itself?) add an if (if male is X and female is Y, then this results as a crossbreed as Z (with high failure percentage) )..

do you think this could be possible, or i'm wasting my time? :)

The code location you have listed is what does it. If you want customs, just look at the example I gave above in my Male-Female code. I basically just change the Type. So, what you can do is create a static function and pass in the two types of creatures, and output a Type:

Code:
public static Type MatingResult(Type t1, Type t2){ 
if (t1 == typeof(Wolf) && t2 == typeof(DireWolf) || t2 == typeof(Wolf) && t1 == typeof(DireWolf)
return typeof(WareWolf);
elseif
 ....
return t1;}

Thilgon;805170 said:
edit
i thought that the easiest way to set the crossbreed would be adding another file, wich olds all the different combinations that can be done, to be customized by who uses this system with the crossbreed enabled...
something like
if Female && typeof(drake)
{ if Male is typeof(wyvern)
{Creature == typeof(PoisonousDragon)}}

if Female && typeof(WarHorse)
{ if Male is typeof(PackHorse)
{ Creature == typeof(PackWarHorse) }
elseif Male is typeof(Nightmare)
{ Creature == typeof(Incubus) }}

and so on... this would be called in the baby result with a low (less then 50%) chance only if crossbreeding would be enabled and they get the correct type of creature to be bred, otherwhise they would end up with the simple version of one of the 2 parents...
haven't scripted anything yet, but... this might interest you for this system?


This works and is acceptable. The tests and %s could (and SHOULD) be listed in the function I placed above so you don't pollute the system and contain your changes. The less 'if-thens' slapped inside complex code segments, the better! :)

Good luck!
 

Thilgon

Sorceror
wondering if i am doing it right...

i added in BaseCreature this line in the JakoTaming region
Code:
public Type JakoCanMateWith = null;

and this in the animals constructors
Code:
 JakoCanMateWith = typeof( *corresponding animal* );

this is my full JakoBreeder:

Code:
using System;
using System.Collections.Generic;
using System.Text;
using Server.Mobiles;
using Server.ContextMenus;
using Server;
using Custom.Jerbal.Jako.Gumps;
using Server.Gumps;
using System.Collections;
using Custom.Jerbal.Jako.Breeding;
using Server.Misc;


namespace Custom.Jerbal.Jako.Breeding
{
    class JakoBreeder : AnimalTrainer
    {
		// Added for Crossbreeding
		private static bool AllowCrossbreed = true;

        private static ArrayList m_PendingOffers = new ArrayList();
        public static ArrayList PendingOffers { get { return m_PendingOffers; } set { m_PendingOffers = value; } }

        [Constructable]
        public JakoBreeder()
        {
            Title = "the animal breeder";
            CantWalk = true;
        }

        public override void AddCustomContextEntries(Server.Mobile from, List<Server.ContextMenus.ContextMenuEntry> list)
        {
            list.Add(new BreedEntry(this,from));
            base.AddCustomContextEntries(from, list);
        }


        private class BreedEntry : ContextMenuEntry
        {
            private JakoBreeder m_Trainer;
            private PlayerMobile m_From;

            public BreedEntry(JakoBreeder trainer, Mobile from)
                : base(6146, 10)
            {
                if (from is PlayerMobile)
                    m_From = (PlayerMobile)from;
                m_Trainer = trainer;               
            }

            public override void OnClick()
            {
                if (m_From == null)
                    return;
                JakoBreeder.BreedClick(m_From, m_Trainer);
                
            }
        }

        public static void DoBreeding(Mobile from, int DictID)
        {
            BreedingRequest req = (BreedingRequest)m_PendingOffers[DictID];
            if (!req.Accepted && (((BaseCreature)req.Creature1).ControlMaster != ((BaseCreature)req.Creature2).ControlMaster))
            {
                req.Accepted = true;
                from.SendMessage("They have been notified you accepted the offer.");
                if (((BaseCreature)req.Creature2).ControlMaster == from)
                    ((BaseCreature)req.Creature1).ControlMaster.SendMessage("They have accepted the breeding offer.");
                else
                    ((BaseCreature)req.Creature2).ControlMaster.SendMessage("They have accepted the breeding offer.");
                return;
            }
            JakoBreeder.EndBreeding(req);
            m_PendingOffers.RemoveAt(DictID);

        }

        public static void EndBreeding(BreedingRequest request)
        {
            BaseCreature c1 = ((BaseCreature)request.Creature1);
            BaseCreature c2 = ((BaseCreature)request.Creature2);
            PlayerMobile pm1 = (PlayerMobile)c1.ControlMaster;
            PlayerMobile pm2 = (PlayerMobile)c2.ControlMaster;
            int gp1 = JakoBreeder.GoldPrice(request.Creature1, request.Creature2);
            int gp2 = JakoBreeder.GoldPrice(request.Creature1, request.Creature2);

            if (Banker.GetBalance(pm1) < gp1 || Banker.GetBalance(pm2) < gp2)
            {
                pm1.SendMessage("The breeding has been canceled due to insufficient funds.");
                if (pm1 != pm2)
                    pm2.SendMessage("The breeding has been canceled due to insufficient funds.");
                return;
            }

            Banker.Withdraw((Mobile)pm1, gp1);
            Banker.Withdraw((Mobile)pm2, gp2);

            ReadyPetForBreed(c1);
            ReadyPetForBreed(c2);
            
            pm1.AddToBackpack(new BreedingParentTicket(pm1, pm2, c1, c2, DateTime.Now + c1.NextMateIn));
            pm2.AddToBackpack(new BreedingParentTicket(pm2, pm1, c2, c1, DateTime.Now + c2.NextMateIn));

        }

        private static void ReadyPetForBreed(BaseCreature pet)
        {
            pet.ControlTarget = null;
            pet.ControlOrder = OrderType.Stay;
            pet.Internalize();
            pet.SetControlMaster(null);
        }

        private static void ReadyPetForReturn(Mobile owner, Mobile pet)
        {
            if (!(pet is BaseCreature))
                return;
            BaseCreature bc = pet as BaseCreature;
            bc.NextMate = DateTime.Now + bc.NextMateIn;
            bc.ControlTarget = null;
            bc.ControlOrder = OrderType.Stay;
            bc.Map = owner.Map;
            bc.Location = owner.Location;
            bc.SetControlMaster(owner);
        }

        public static void CancelBreeding(int DictID)
        {
            BreedingRequest req = (BreedingRequest)m_PendingOffers[DictID];
            m_PendingOffers.RemoveAt(DictID);
            ((BaseCreature)req.Creature1).ControlMaster.SendMessage("The Breeding has been canceled.");
            ((BaseCreature)req.Creature1).ControlMaster.CloseGump(typeof(JakoBreederAcceptGump));

            if (((BaseCreature)req.Creature1).ControlMaster == ((BaseCreature)req.Creature2).ControlMaster)
                return;
            ((BaseCreature)req.Creature2).ControlMaster.SendMessage("The Breeding has been canceled.");
            ((BaseCreature)req.Creature2).ControlMaster.CloseGump(typeof(JakoBreederAcceptGump));
        }

        public static void SendMasterOkayGumps(Mobile targeter, BaseCreature bc1, BaseCreature bc2)
        {
            CleanUpPendingOffers();
            int dictID = PendingOffers.Add(new BreedingRequest(bc1,bc2));
            bc1.ControlMaster.SendGump(new JakoBreederAcceptGump(targeter,bc1,bc2,dictID));
            if (bc1.ControlMaster != bc2.ControlMaster)
                bc2.ControlMaster.SendGump(new JakoBreederAcceptGump(targeter,bc2,bc1,dictID));
        }

        private static void CleanUpPendingOffers()
        {
            PlayerMobile pm1;
            PlayerMobile pm2;
            foreach (BreedingRequest br in m_PendingOffers)
            {
                pm1 = (PlayerMobile)((BaseCreature)br.Creature1).ControlMaster;
                pm2 = (PlayerMobile)((BaseCreature)br.Creature2).ControlMaster;
                if (pm1.NetState == null || pm2.NetState == null || (!br.Accepted && (!pm1.HasGump(typeof(JakoBreederAcceptGump)) || !pm2.HasGump(typeof(JakoBreederAcceptGump)))))
                    m_PendingOffers.Remove(br);
            }
        }

        public static void BreedClick(PlayerMobile pm, Mobile breeder)
        {

            if (pm.Skills[SkillName.AnimalTaming].Value < 95.0)
            {
                breeder.SayTo(pm, "I refuse to waste my time with someone who is not skilled in taming.");
                return;
            }
            pm.SendGump(new JakoBreederTalkGump(pm, breeder));
        }

        public static string CanBreed(Mobile animal)
        {

            BaseCreature bc;
            if (animal.Deleted)
                return "That has been deleted";

            if (animal is PlayerMobile)
                return String.Format("I don't specialize in that but I know a {0} who might be able to help.", (animal.Female ? "guy" : "girl"));

            bc = animal as BaseCreature;
            if (bc == null || !bc.JakoIsEnabled)
                return "You can't breed that!";

            if (bc is JakoBreeder)
            {
                bc.Emote("scoffs");
                return String.Format("I should {0} you...",(bc.Female?"slap":"hit"));
            }
            if (bc.Body.IsHuman)
                return "You'll need to find an inn keeper for that.";
            if (!bc.Tamable)
                return "I specialize only in tameable pets.";
            if (bc.ControlMaster == null)
                return "That's not tame to anyone!"; //502674
            if (bc.NextMate > DateTime.Now)
                return "That animal is still recovering from breeding.";
            if (bc.IsDeadBondedPet)
                return "Living pets only, please."; //1049668
            if (bc.RealLevel < bc.MatingLevel)
                return "That pet is to young to mate.";
            return null;
        }

        public static string CanBreed(Mobile animal1, Mobile animal2)
        {
            BaseCreature bc1, bc2;
            if (animal1.Deleted || animal2.Deleted)
                return "One of those has been deleted.";
            bc1 = animal1 as BaseCreature;
            bc2 = animal2 as BaseCreature;
            if (bc1 == null || bc2 == null)
                return "Unexpected error.  One of these isn't an animal!"; //shouldn't happen.  Caught before called
            if (bc1 == bc2)
                return (bc1.Female ? "I'm all out of magic juice and haven't been to THAT bank for awhile, sorry." : "I don't think it's long enough, and won't produce the results you want anyways.");
        // Modded for CrossBreeding    
			if (bc1.GetType() != bc2.GetType() && bc1.JakoCanMateWith != bc2.GetType() && bc1.GetType() != bc2.JakoCanMateWith)
                return "That seems complicated.";
            if (bc1.Female == bc2.Female)
                return "I think it would be best to not push your beliefs on these creatures.";
            if (Math.Abs((int)(bc1.RealLevel - bc2.RealLevel)) > 5)
                return "These creatures are to different in level to mate them safely.";
            return null;
        }

        public static int GoldPrice(Mobile creature1, Mobile creature2)
        {
            if (creature1.Deleted || creature2.Deleted)
                return 0;
            double mult =1;
            if (((BaseCreature)creature1).ControlMaster == ((BaseCreature)creature2).ControlMaster)
                mult = 2;
            return (int)(((BaseCreature)creature1).Level * ((BaseCreature)creature1).Level * 500*mult);
        }


        public override bool OnDragDrop( Mobile from, Item dropped )
        {
            if (dropped is BreedingParentTicket)
            {
                BreedingParentTicket bt = (BreedingParentTicket)dropped;
                if (bt.Creature == null || bt.Creature.Deleted)
                {
                    from.SendMessage("Your pet has been lost forever.  I have added to your bank a level 50 rabbit deed and turned this one worthless.  Please page a GM with details of this error.");
                    bt.NullifyDeed();
                    BaseCreature rab = new Rabbit();
                    rab.MaxLevel = 50;
                    rab.Level = 50;
                    from.BankBox.AddItem(new BreedingParentTicket(bt.Owner, bt.OtherParent, rab, rab, DateTime.MinValue));
                    return false;
                }
                if (bt.Owner != from && (bt.DoneReal == DateTime.MinValue && bt.OtherParent != from))
                {
                    from.SendMessage("This ticket is not yours! You can not claim it!");
                    return false;
                }
                if (bt.DoneReal >= DateTime.Now)
                {
                    from.SendMessage("Your pet is not ready yet.");
                    //from.SendMessage("But this is testing, so I'm moving on anyway.");
                    return false;
                }

                if (((BaseCreature)bt.Creature).ControlSlots > (from.FollowersMax - from.Followers))
                {
                    from.SendMessage("You have to many followers to collect this creature");
                    return false;
                }


                ReadyPetForReturn(from, bt.Creature);
                if (bt.DoneReal == DateTime.MinValue)
                    return true;
                if (bt.Failed)
                {
                    bt.Owner.SendMessage("The breeding has failed! Some of your money has been returned.");
                    bt.OtherParent.SendMessage("The breeding has failed! Some of your money has been returned.");
                    Banker.Deposit(bt.Owner, (int)(JakoBreeder.GoldPrice(bt.Creature, bt.OtherCreature) * .75));
                    Banker.Deposit(bt.OtherParent, (int)(JakoBreeder.GoldPrice(bt.OtherCreature, bt.Creature) * .75));
                    return true;
                }

                if (bt.Creature.Female)
                {
				// Added for Crossbreeding
					Type cre = bt.Creature.GetType();
                    if (bt.Creature is BaseCreature && ((BaseCreature)bt.Creature).JakoCanMateWith != null)
                        cre = (Utility.RandomBool() ? bt.Creature.GetType() : ((BaseCreature)bt.Creature).MatingResult);

					// Modded for Crossbreeding
                    BaseCreature baby1 = Activator.CreateInstance(cre) as BaseCreature;
                    baby1.MaxLevel = (uint)Math.Ceiling((double)((((BaseCreature)bt.Creature).Level + ((BaseCreature)bt.OtherCreature).Level) / 2) + 1);
                    from.SendMessage("Adding Baby ticket to bank");
                    from.BankBox.AddItem(new BreedingParentTicket(bt.Owner, bt.OtherParent, baby1, DateTime.MinValue));
                    if (bt.Twins)
                    {
						// Modded for Crossbreeding
                        BaseCreature baby2 = Activator.CreateInstance(cre) as BaseCreature;
                        baby2.Female = baby1.Female;
                        baby2.MaxLevel = baby1.MaxLevel;
                        bt.Owner.SendMessage("Congratulations, your pet has just had twins! The father of the child has received the additional ticket.");
                        if (bt.Owner != bt.OtherParent)
                            bt.OtherParent.SendMessage(" Good news, it's twins! {0} has just recieved the second baby. Your ticket to redeem has been placed in your bank.", bt.Owner.Name);
                        bt.OtherParent.BankBox.AddItem(new BreedingParentTicket(bt.OtherParent, bt.Owner, baby2, DateTime.MinValue));
                    }
                }
                return true;
            }
            return false;
        }

		// Added for Crossbreeding, just a test right now...
		public static Type MatingResult(Type t1, Type t2)
		{ 
			if ( AllowCrossbreed )
			{
				if ( t1 == typeof( WhiteWolf ) && t2 == typeof( DireWolf) || t2 == typeof( WhiteWolf) && t1 == typeof(DireWolf ) )
					return typeof( GreyWolf );

				else if ( t1 == typeof( BlackBear ) && t2 == typeof ( BrownBear ) || t2 == typeof( BlackBear ) && t1 == typeof ( BrownBear ) )
 					return typeof( GrizzlyBear );
			}

			return t2;
		}

        public override void OnSpeech(SpeechEventArgs e)
        {
            if (e.Speech.ToLower().Equals("i wish to mate"))
                SayTo(e.Mobile,String.Format("I'm not that type of {0}.",(Female?"girl":"guy")));
            else if (e.Speech.ToLower().Contains("i wish to mate animals") || e.Speech.ToLower().Contains("talk"))
                JakoBreeder.BreedClick((PlayerMobile)e.Mobile, this);
            base.OnSpeech(e);
        }

		public JakoBreeder( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
		}


        public class BreedingRequest
        {
            public Mobile Creature1;
            public Mobile Creature2;
            public bool Accepted;

            public BreedingRequest(Mobile c1, Mobile c2)
            {
                Creature1 = c1;
                Creature2 = c2;
                Accepted = false;
            }
        }
    }
}

as you can see i added a bool in the beginning to enable/disable the crossbreeding, then added the code... hope i'm doing it right :)

it is giving some errors anyway...

Errors:
+ Customs/Jerbal/Jako/Breeding/JakoBreeder.cs:
CS0117: Line 290: 'Server.Mobiles.BaseCreature' does not contain a definition for 'MatingResult'.

does that part have to be in basecreature? or i need to make other adjustments?
 

Jerbal

Sorceror
Thilgon;805286 said:
as you can see i added a bool in the beginning to enable/disable the crossbreeding, then added the code... hope i'm doing it right :)

it is giving some errors anyway...

Errors:
+ Customs/Jerbal/Jako/Breeding/JakoBreeder.cs:
CS0117: Line 290: 'Server.Mobiles.BaseCreature' does not contain a definition for 'MatingResult'.

does that part have to be in basecreature? or i need to make other adjustments?

You're using the Cre variable wrong in your instance:
In JakoBreeder.cs replace:
Code:
// Added for Crossbreeding
					Type cre = bt.Creature.GetType();
                    if (bt.Creature is BaseCreature && ((BaseCreature)bt.Creature).JakoCanMateWith != null)
                        cre = (Utility.RandomBool() ? bt.Creature.GetType() : ((BaseCreature)bt.Creature).MatingResult);
with:
Code:
// Added for Crossbreeding
Type cre =MatingResult(bt.Creature.GetType(),bt.OtherCreature.GetType());

In the MatingResult class, make sure you put your %s of success in there, like:
Code:
else if (( t1 == typeof( BlackBear ) && t2 == typeof ( BrownBear ) || t2 == typeof( BlackBear ) && t1 == typeof ( BrownBear ) )&&  Utility.RandomDouble() > .9) //10% chance to 'cross breed', otherwise it's the default (t1's type)
 					return typeof( GrizzlyBear );


Good luck
 

Thilgon

Sorceror
tested, it seems to work fine :)
anyway, i modded the breeder to return tickets immediatly, and, while female animals were returned after the setted time, it won't return males after the same time... this is kinda strange...
however, the crossbreed works, even if, if i change the slightest thing in the breeder (like, the return ticket timer), it begins to say the crossbreeding animals don't match, so i had to spawn some more to test, and this time they worked... kinda odd, since i didn't touch the animals themselves, but just the breeder timing...

i guess this function has still to be perfected, i'll let you know further tests results :)

thanks for your help :)
 

Jerbal

Sorceror
I'm pretty certain the SVN and the RC2 BaseCreature.cs and AnimalLore.cs are the same. WinMerge the two with what you have and see if anything not in Jako Regions changes.
 

jacquesc1

Sorceror
geting folowing errors need help please

the errors wen starting runuo

Code:
Errors:
 + Skills/AnimalLore.cs:
    CS0103: Line 138: The name 'm_bc' does not exist in the current context
    CS0103: Line 336: The name 'FormatString' does not exist in the current cont
ext
    CS0103: Line 384: The name 'm' does not exist in the current context
    CS0103: Line 476: The name 'm_bc' does not exist in the current context
    CS0103: Line 476: The name 'm_bc' does not exist in the current context
    CS0103: Line 477: The name 'm_bc' does not exist in the current context
    CS0103: Line 477: The name 'm_bc' does not exist in the current context
    CS0103: Line 478: The name 'm_bc' does not exist in the current context
    CS0103: Line 478: The name 'm_bc' does not exist in the current context
    CS0103: Line 479: The name 'm_bc' does not exist in the current context
    CS0103: Line 479: The name 'm_bc' does not exist in the current context
    CS0103: Line 480: The name 'm_bc' does not exist in the current context
    CS0103: Line 480: The name 'm_bc' does not exist in the current context
    CS0103: Line 481: The name 'm_bc' does not exist in the current context
    CS0103: Line 481: The name 'm_bc' does not exist in the current context
    CS0103: Line 482: The name 'm_bc' does not exist in the current context
    CS0103: Line 482: The name 'm_bc' does not exist in the current context
    CS0103: Line 483: The name 'm_bc' does not exist in the current context
    CS0103: Line 483: The name 'm_bc' does not exist in the current context
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

the merged file

Code:
using System;
using Server;
using Server.Gumps;
using Server.Mobiles;
using Server.Targeting;
using Custom.Jerbal.Jako;

namespace Server.SkillHandlers
{
	public class AnimalLore
	{
		public static void Initialize()
		{
			SkillInfo.Table[(int)SkillName.AnimalLore].Callback = new SkillUseCallback( OnUse );
		}

		public static TimeSpan OnUse(Mobile m)
		{
			m.Target = new InternalTarget();

			m.SendLocalizedMessage( 500328 ); // What animal should I look at?

			return TimeSpan.FromSeconds( 1.0 );
		}

		private class InternalTarget : Target
		{
			public InternalTarget() : base( 8, false, TargetFlags.None )
			{
			}

			protected override void OnTarget( Mobile from, object targeted )
			{
				if ( !from.Alive )
				{
					from.SendLocalizedMessage( 500331 ); // The spirits of the dead are not the province of animal lore.
				}
				else if ( targeted is BaseCreature )
				{
					BaseCreature c = (BaseCreature)targeted;

					if ( !c.IsDeadPet )
					{
						if ( c.Body.IsAnimal || c.Body.IsMonster || c.Body.IsSea )
						{
							if ( (!c.Controlled || !c.Tamable) && from.Skills[SkillName.AnimalLore].Base < 100.0 )
							{
								from.SendLocalizedMessage( 1049674 ); // At your skill level, you can only lore tamed creatures.
							}
							else if ( !c.Tamable && from.Skills[SkillName.AnimalLore].Base < 110.0 )
							{
								from.SendLocalizedMessage( 1049675 ); // At your skill level, you can only lore tamed or tameable creatures.
							}
							else if ( !from.CheckTargetSkill( SkillName.AnimalLore, c, 0.0, 120.0 ) )
							{
								from.SendLocalizedMessage( 500334 ); // You can't think of anything you know offhand.
							}
							else
							{
								from.CloseGump( typeof( AnimalLoreGump ) );
								from.SendGump( new AnimalLoreGump( c ) );
							}
						}
						else
						{
							from.SendLocalizedMessage( 500329 ); // That's not an animal!
						}
					}
					else
					{
						from.SendLocalizedMessage( 500331 ); // The spirits of the dead are not the province of animal lore.
					}
				}
				else
				{
					from.SendLocalizedMessage( 500329 ); // That's not an animal!
				}
			}
		}
	}

	public class AnimalLoreGump : Gump
	{
		private static string FormatSkill( BaseCreature c, SkillName name )
		{
			Skill skill = c.Skills[name];

			if ( skill.Base < 10.0 )
				return "<div align=right>---</div>";

			return String.Format( "<div align=right>{0:F1}</div>", skill.Base );
        }

        #region Jako Taming
        private static string FormatAttributes(int cur, uint max)
        {
            return FormatAttributes(cur, (int)max);
        }
        #endregion

		private static string FormatAttributes( int cur, int max )
		{
			if ( max == 0 )
				return "<div align=right>---</div>";

			return String.Format( "<div align=right>{0}/{1}</div>", cur, max );
		}

		private static string FormatStat( int val )
		{
			if ( val == 0 )
				return "<div align=right>---</div>";

			return String.Format( "<div align=right>{0}</div>", val );
		}

		private static string FormatDouble( double val )
		{
			if ( val == 0 )
				return "<div align=right>---</div>";

			return String.Format( "<div align=right>{0:F1}</div>", val );
		}

		private static string FormatElement( int val )
		{
			if ( val <= 0 )
				return "<div align=right>---</div>";

			return String.Format( "<div align=right>{0}%</div>", val );
		}

		private const int LabelColor = 0x24E5;

		public AnimalLoreGump( BaseCreature c ) : base( 250, 50 )
		{
            #region Jako Taming Added
            m_bc = c;
            #endregion
			AddPage( 0 );

			AddImage( 100, 100, 2080 );
			AddImage( 118, 137, 2081 );
			AddImage( 118, 207, 2081 );
			AddImage( 118, 277, 2081 );
			AddImage( 118, 347, 2083 );

			AddHtml( 147, 108, 210, 18, String.Format( "<center><i>{0}</i></center>", c.Name ), false, false );

			AddButton( 240, 77, 2093, 2093, 2, GumpButtonType.Reply, 0 );

			AddImage( 140, 138, 2091 );
			AddImage( 140, 335, 2091 );

            #region Jako Taming Edited
            int pages = ( Core.AOS ? 5 : 3 ) + ( c.JakoIsEnabled ? 1 : 0 ) + (c.Controlled && c.ControlMaster != null ? 1 : 0);
            #endregion

            int page = 0;


			#region Attributes
			AddPage( ++page );

			AddImage( 128, 152, 2086 );
			AddHtmlLocalized( 147, 150, 160, 18, 1049593, 200, false, false ); // Attributes

			AddHtmlLocalized( 153, 168, 160, 18, 1049578, LabelColor, false, false ); // Hits
			AddHtml( 280, 168, 75, 18, FormatAttributes( c.Hits, c.HitsMax ), false, false );

			AddHtmlLocalized( 153, 186, 160, 18, 1049579, LabelColor, false, false ); // Stamina
			AddHtml( 280, 186, 75, 18, FormatAttributes( c.Stam, c.StamMax ), false, false );

			AddHtmlLocalized( 153, 204, 160, 18, 1049580, LabelColor, false, false ); // Mana
			AddHtml( 280, 204, 75, 18, FormatAttributes( c.Mana, c.ManaMax ), false, false );

			AddHtmlLocalized( 153, 222, 160, 18, 1028335, LabelColor, false, false ); // Strength
			AddHtml( 320, 222, 35, 18, FormatStat( c.Str ), false, false );

			AddHtmlLocalized( 153, 240, 160, 18, 3000113, LabelColor, false, false ); // Dexterity
			AddHtml( 320, 240, 35, 18, FormatStat( c.Dex ), false, false );

			AddHtmlLocalized( 153, 258, 160, 18, 3000112, LabelColor, false, false ); // Intelligence
			AddHtml( 320, 258, 35, 18, FormatStat( c.Int ), false, false );

			if ( Core.AOS )
			{
				int y = 276;

				if ( Core.SE )
				{
					double bd = Items.BaseInstrument.GetBaseDifficulty( c );
					if ( c.Uncalmable )
						bd = 0;

					AddHtmlLocalized( 153, 276, 160, 18, 1070793, LabelColor, false, false ); // Barding Difficulty
					AddHtml( 320, y, 35, 18, FormatDouble( bd ), false, false );

					y += 18;
				}

				AddImage( 128, y + 2, 2086 );
				AddHtmlLocalized( 147, y, 160, 18, 1049594, 200, false, false ); // Loyalty Rating
				y += 18;

				AddHtmlLocalized( 153, y, 160, 18, (!c.Controlled || c.Loyalty == 0) ? 1061643 : 1049595 + (c.Loyalty / 10), LabelColor, false, false );
			}
			else
			{
				AddImage( 128, 278, 2086 );
				AddHtmlLocalized( 147, 276, 160, 18, 3001016, 200, false, false ); // Miscellaneous

				AddHtmlLocalized( 153, 294, 160, 18, 1049581, LabelColor, false, false ); // Armor Rating
				AddHtml( 320, 294, 35, 18, FormatStat( c.VirtualArmor ), false, false );
			}

			AddButton( 340, 358, 5601, 5605, 0, GumpButtonType.Page, page + 1 );
			AddButton( 317, 358, 5603, 5607, 0, GumpButtonType.Page, pages );
			#endregion

			#region Resistances
			if ( Core.AOS )
			{
				AddPage( ++page );

				AddImage( 128, 152, 2086 );
				AddHtmlLocalized( 147, 150, 160, 18, 1061645, 200, false, false ); // Resistances

				AddHtmlLocalized( 153, 168, 160, 18, 1061646, LabelColor, false, false ); // Physical
				AddHtml( 320, 168, 35, 18, FormatElement( c.PhysicalResistance ), false, false );

				AddHtmlLocalized( 153, 186, 160, 18, 1061647, LabelColor, false, false ); // Fire
				AddHtml( 320, 186, 35, 18, FormatElement( c.FireResistance ), false, false );

				AddHtmlLocalized( 153, 204, 160, 18, 1061648, LabelColor, false, false ); // Cold
				AddHtml( 320, 204, 35, 18, FormatElement( c.ColdResistance ), false, false );

				AddHtmlLocalized( 153, 222, 160, 18, 1061649, LabelColor, false, false ); // Poison
				AddHtml( 320, 222, 35, 18, FormatElement( c.PoisonResistance ), false, false );

				AddHtmlLocalized( 153, 240, 160, 18, 1061650, LabelColor, false, false ); // Energy
				AddHtml( 320, 240, 35, 18, FormatElement( c.EnergyResistance ), false, false );

				AddButton( 340, 358, 5601, 5605, 0, GumpButtonType.Page, page + 1 );
				AddButton( 317, 358, 5603, 5607, 0, GumpButtonType.Page, page - 1 );
			}
			#endregion

			#region Damage
			if ( Core.AOS )
			{
				AddPage( ++page );

				AddImage( 128, 152, 2086 );
				AddHtmlLocalized( 147, 150, 160, 18, 1017319, 200, false, false ); // Damage

				AddHtmlLocalized( 153, 168, 160, 18, 1061646, LabelColor, false, false ); // Physical
				AddHtml( 320, 168, 35, 18, FormatElement( c.PhysicalDamage ), false, false );

				AddHtmlLocalized( 153, 186, 160, 18, 1061647, LabelColor, false, false ); // Fire
				AddHtml( 320, 186, 35, 18, FormatElement( c.FireDamage ), false, false );

				AddHtmlLocalized( 153, 204, 160, 18, 1061648, LabelColor, false, false ); // Cold
				AddHtml( 320, 204, 35, 18, FormatElement( c.ColdDamage ), false, false );

				AddHtmlLocalized( 153, 222, 160, 18, 1061649, LabelColor, false, false ); // Poison
				AddHtml( 320, 222, 35, 18, FormatElement( c.PoisonDamage ), false, false );

				AddHtmlLocalized( 153, 240, 160, 18, 1061650, LabelColor, false, false ); // Energy
				AddHtml( 320, 240, 35, 18, FormatElement( c.EnergyDamage ), false, false );

				AddButton( 340, 358, 5601, 5605, 0, GumpButtonType.Page, page + 1 );
				AddButton( 317, 358, 5603, 5607, 0, GumpButtonType.Page, page - 1 );
			}
			#endregion

			#region Skills
			AddPage( ++page );

			AddImage( 128, 152, 2086 );
			AddHtmlLocalized( 147, 150, 160, 18, 3001030, 200, false, false ); // Combat Ratings

			AddHtmlLocalized( 153, 168, 160, 18, 1044103, LabelColor, false, false ); // Wrestling
			AddHtml( 320, 168, 35, 18, FormatSkill( c, SkillName.Wrestling ), false, false );

			AddHtmlLocalized( 153, 186, 160, 18, 1044087, LabelColor, false, false ); // Tactics
			AddHtml( 320, 186, 35, 18, FormatSkill( c, SkillName.Tactics ), false, false );

			AddHtmlLocalized( 153, 204, 160, 18, 1044086, LabelColor, false, false ); // Magic Resistance
			AddHtml( 320, 204, 35, 18, FormatSkill( c, SkillName.MagicResist ), false, false );

			AddHtmlLocalized( 153, 222, 160, 18, 1044061, LabelColor, false, false ); // Anatomy
			AddHtml( 320, 222, 35, 18, FormatSkill( c, SkillName.Anatomy ), false, false );

			AddHtmlLocalized( 153, 240, 160, 18, 1044090, LabelColor, false, false ); // Poisoning
			AddHtml( 320, 240, 35, 18, FormatSkill( c, SkillName.Poisoning ), false, false );

			AddImage( 128, 260, 2086 );
			AddHtmlLocalized( 147, 258, 160, 18, 3001032, 200, false, false ); // Lore & Knowledge

			AddHtmlLocalized( 153, 276, 160, 18, 1044085, LabelColor, false, false ); // Magery
			AddHtml( 320, 276, 35, 18, FormatSkill( c, SkillName.Magery ), false, false );

			AddHtmlLocalized( 153, 294, 160, 18, 1044076, LabelColor, false, false ); // Evaluating Intelligence
			AddHtml( 320, 294, 35, 18,FormatSkill( c, SkillName.EvalInt ), false, false );

			AddHtmlLocalized( 153, 312, 160, 18, 1044106, LabelColor, false, false ); // Meditation
			AddHtml( 320, 312, 35, 18, FormatSkill( c, SkillName.Meditation ), false, false );

            AddButton(340, 358, 5601, 5605, 0, GumpButtonType.Page, page + 1);
            AddButton(317, 358, 5603, 5607, 0, GumpButtonType.Page, page - 1);

            #endregion

            #region Jako Taming | Skills
            if (c.Tamable)
            {
                #region Jako Taming When Tamed
                if (c.Controlled && c.ControlMaster != null)
                {
                    AddPage(++page);

                    AddImage(128, 152, 2086);
                    AddHtml(147, 150, 160, 18, "<basefont color=#003142>Characteristics</basefont>", false, false);

                    AddHtml(153, 168, 160, 18, "<basefont color=#4A3929>Level</basefont>", false, false);
                    AddHtml(280, 168, 75, 18, FormatAttributes((int)c.Level, (int)c.MaxLevel), false, false);

                    AddHtml(153, 186, 160, 18, "<basefont color=#4A3929>Traits Remaining</basefont>", false, false);
                    AddHtml(280, 186, 75, 18, FormatStat((int)c.Traits), false, false);

                    AddHtml(153, 204, 160, 18, "<basefont color=#4A3929>Mating Level</basefont>", false, false);
                    AddHtml(280, 204, 75, 18, FormatStat((int)c.MatingLevel), false, false);

                    AddHtml(153, 222, 160, 18, "<basefont color=#4A3929>Sex</basefont>", false, false);
                    AddHtml(320, 222, 35, 18, FormatString(c.SexString), false, false);

                    AddHtml(153, 240, 160, 18, "<basefont color=#4A3929>Experience Earned</basefont>", false, false);
                    AddHtml(320, 240, 35, 18, FormatStat((int)c.Experience), false, false);

                    AddHtml(153, 258, 160, 18, "<basefont color=#4A3929>Experience Needed</basefont>", false, false);
                    AddHtml(320, 258, 35, 18, FormatStat((int)c.ExpToNextLevel), false, false);

                    AddButton(340, 358, 5601, 5605, 0, GumpButtonType.Page, page + 1);
                    AddButton(317, 358, 5603, 5607, 0, GumpButtonType.Page, page - 1);
                }
                #endregion


                #region Jako Taming Max Stats/Attributes
                AddPage(++page);
                
                AddImage(128, 152, 2086);
                AddHtml(147, 150, 160, 18, "<basefont color=#003142>Max Resistances</basefont>", false, false); // Resistances

                AddHtmlLocalized(153, 168, 160, 18, 1061646, LabelColor, false, false); // Physical
                AddHtml(280, 168, 75, 18, FormatAttributes(c.PhysicalResistance, c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusPhysResist).MaxBonus(c)), false, false);

                AddHtmlLocalized(153, 186, 160, 18, 1061647, LabelColor, false, false); // Fire
                AddHtml(280, 186, 75, 18, FormatAttributes(c.FireResistance, c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusFireResist).MaxBonus(c)), false, false);

                AddHtmlLocalized(153, 204, 160, 18, 1061648, LabelColor, false, false); // Cold
                AddHtml(280, 204, 75, 18, FormatAttributes(c.ColdResistance, c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusColdResist).MaxBonus(c)), false, false);

                AddHtmlLocalized(153, 222, 160, 18, 1061649, LabelColor, false, false); // Poison
                AddHtml(280, 222, 75, 18, FormatAttributes(c.PoisonResistance, c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusPoisResist).MaxBonus(c)), false, false);

                AddHtmlLocalized(153, 240, 160, 18, 1061650, LabelColor, false, false); // Energy
                AddHtml(280, 240, 75, 18, FormatAttributes(c.EnergyResistance, c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusEnerResist).MaxBonus(c)), false, false);

                AddImage(128, 260, 2086);
                AddHtml(147, 258, 160, 18, "<basefont color=#003142>Max Attributes</basefont>", false, false); // Lore & Knowledge


                AddHtmlLocalized(153, 276, 160, 18, 1049578, LabelColor, false, false); // Hits
                AddHtml(280, 276, 75, 18, FormatAttributes(c.HitsMax, c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.Hits).MaxBonus(c)), false, false);

                AddHtmlLocalized(153, 294, 160, 18, 1049579, LabelColor, false, false); // Stamina
                AddHtml(280, 294, 75, 18, FormatAttributes(c.StamMax, c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.Stam).MaxBonus(c)), false, false);

                AddHtmlLocalized(153, 312, 160, 18, 1049580, LabelColor, false, false); // Mana
                AddHtml(280, 312, 75, 18, FormatAttributes(c.ManaMax, c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.Mana).MaxBonus(c)), false, false);

                if (c.ControlMaster == m)
                {
                    Int32 locked = 0x82C;
                    Int32 up = 0x983;
                    Int32 b1004 = (c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusPhysResist).MaxBonus(c) <= c.PhysicalResistance ? locked : up);
                    Int32 b1005 = (c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusFireResist).MaxBonus(c) <= c.FireResistance ? locked : up);
                    Int32 b1006 = (c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusColdResist).MaxBonus(c) <= c.ColdResistance ? locked : up);
                    Int32 b1007 = (c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusPoisResist).MaxBonus(c) <= c.PoisonResistance ? locked : up);
                    Int32 b1008 = (c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusEnerResist).MaxBonus(c) <= c.EnergyResistance ? locked : up);
                    Int32 b1001 = (c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.Hits).MaxBonus(c) <= c.HitsMax ? locked : up);
                    Int32 b1002 = (c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.Stam).MaxBonus(c) <= c.StamMax ? locked : up);
                    Int32 b1003 = (c.m_jakoAttributes.GetAttribute(JakoAttributesEnum.Mana).MaxBonus(c) <= c.ManaMax ? locked : up);

                    AddButton(130, 168, b1004, b1004, 1004, GumpButtonType.Reply, 0);
                    AddButton(130, 186, b1005, b1005, 1005, GumpButtonType.Reply, 0);
                    AddButton(130, 204, b1006, b1006, 1006, GumpButtonType.Reply, 0);
                    AddButton(130, 222, b1007, b1007, 1007, GumpButtonType.Reply, 0);
                    AddButton(130, 240, b1008, b1008, 1008, GumpButtonType.Reply, 0);
                    AddButton(130, 276, b1001, b1001, 1001, GumpButtonType.Reply, 0);
                    AddButton(130, 294, b1002, b1002, 1002, GumpButtonType.Reply, 0);
                    AddButton(130, 312, b1003, b1003, 1003, GumpButtonType.Reply, 0);

                }


                AddButton(340, 358, 5601, 5605, 0, GumpButtonType.Page, page + 1);
                AddButton(317, 358, 5603, 5607, 0, GumpButtonType.Page, page - 1);
                #endregion
            }
            #endregion

            #region Misc
            AddPage( ++page );

			AddImage( 128, 152, 2086 );
			AddHtmlLocalized( 147, 150, 160, 18, 1049563, 200, false, false ); // Preferred Foods

			int foodPref = 3000340;

			if ( (c.FavoriteFood & FoodType.FruitsAndVegies) != 0 )
				foodPref = 1049565; // Fruits and Vegetables
			else if ( (c.FavoriteFood & FoodType.GrainsAndHay) != 0 )
				foodPref = 1049566; // Grains and Hay
			else if ( (c.FavoriteFood & FoodType.Fish) != 0 )
				foodPref = 1049568; // Fish
			else if ( (c.FavoriteFood & FoodType.Meat) != 0 )
				foodPref = 1049564; // Meat

			AddHtmlLocalized( 153, 168, 160, 18, foodPref, LabelColor, false, false );

			AddImage( 128, 188, 2086 );
			AddHtmlLocalized( 147, 186, 160, 18, 1049569, 200, false, false ); // Pack Instincts

			int packInstinct = 3000340;

			if ( (c.PackInstinct & PackInstinct.Canine) != 0 )
				packInstinct = 1049570; // Canine
			else if ( (c.PackInstinct & PackInstinct.Ostard) != 0 )
				packInstinct = 1049571; // Ostard
			else if ( (c.PackInstinct & PackInstinct.Feline) != 0 )
				packInstinct = 1049572; // Feline
			else if ( (c.PackInstinct & PackInstinct.Arachnid) != 0 )
				packInstinct = 1049573; // Arachnid
			else if ( (c.PackInstinct & PackInstinct.Daemon) != 0 )
				packInstinct = 1049574; // Daemon
			else if ( (c.PackInstinct & PackInstinct.Bear) != 0 )
				packInstinct = 1049575; // Bear
			else if ( (c.PackInstinct & PackInstinct.Equine) != 0 )
				packInstinct = 1049576; // Equine
			else if ( (c.PackInstinct & PackInstinct.Bull) != 0 )
				packInstinct = 1049577; // Bull

			AddHtmlLocalized( 153, 204, 160, 18, packInstinct, LabelColor, false, false );

			if ( !Core.AOS )
			{
				AddImage( 128, 224, 2086 );
				AddHtmlLocalized( 147, 222, 160, 18, 1049594, 200, false, false ); // Loyalty Rating

				AddHtmlLocalized( 153, 240, 160, 18, (!c.Controlled || c.Loyalty == 0) ? 1061643 : 1049595 + (c.Loyalty / 10), LabelColor, false, false );
			}

			AddButton( 340, 358, 5601, 5605, 0, GumpButtonType.Page, 1 );
			AddButton( 317, 358, 5603, 5607, 0, GumpButtonType.Page, page - 1 );
			#endregion
		}
        public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;
            String reply = "" ;
            switch (info.ButtonID)
            {
                case 1001: reply = m_bc.m_jakoAttributes.GetAttribute(JakoAttributesEnum.Hits).DoOnClick(m_bc); break;
                case 1002: reply = m_bc.m_jakoAttributes.GetAttribute(JakoAttributesEnum.Stam).DoOnClick(m_bc); break;
                case 1003: reply = m_bc.m_jakoAttributes.GetAttribute(JakoAttributesEnum.Mana).DoOnClick(m_bc); break;
                case 1004: reply = m_bc.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusPhysResist).DoOnClick(m_bc); break;
                case 1005: reply = m_bc.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusFireResist).DoOnClick(m_bc); break;
                case 1006: reply = m_bc.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusColdResist).DoOnClick(m_bc); break;
                case 1007: reply = m_bc.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusPoisResist).DoOnClick(m_bc); break;
                case 1008: reply = m_bc.m_jakoAttributes.GetAttribute(JakoAttributesEnum.BonusEnerResist).DoOnClick(m_bc); break;

            }

            if (reply != null)
                from.SendMessage(reply);

            base.OnResponse(sender, info);
        }
    }

   
}

the runuo file non merged

Code:
using System;
using Server;
using Server.Gumps;
using Server.Mobiles;
using Server.Targeting;

namespace Server.SkillHandlers
{
	public class AnimalLore
	{
		public static void Initialize()
		{
			SkillInfo.Table[(int)SkillName.AnimalLore].Callback = new SkillUseCallback( OnUse );
		}

		public static TimeSpan OnUse(Mobile m)
		{
			m.Target = new InternalTarget();

			m.SendLocalizedMessage( 500328 ); // What animal should I look at?

			return TimeSpan.FromSeconds( 1.0 );
		}

		private class InternalTarget : Target
		{
			public InternalTarget() : base( 8, false, TargetFlags.None )
			{
			}

			protected override void OnTarget( Mobile from, object targeted )
			{
				if ( !from.Alive )
				{
					from.SendLocalizedMessage( 500331 ); // The spirits of the dead are not the province of animal lore.
				}
				else if ( targeted is BaseCreature )
				{
					BaseCreature c = (BaseCreature)targeted;

					if ( !c.IsDeadPet )
					{
						if ( c.Body.IsAnimal || c.Body.IsMonster || c.Body.IsSea )
						{
							if ( (!c.Controlled || !c.Tamable) && from.Skills[SkillName.AnimalLore].Base < 100.0 )
							{
								from.SendLocalizedMessage( 1049674 ); // At your skill level, you can only lore tamed creatures.
							}
							else if ( !c.Tamable && from.Skills[SkillName.AnimalLore].Base < 110.0 )
							{
								from.SendLocalizedMessage( 1049675 ); // At your skill level, you can only lore tamed or tameable creatures.
							}
							else if ( !from.CheckTargetSkill( SkillName.AnimalLore, c, 0.0, 120.0 ) )
							{
								from.SendLocalizedMessage( 500334 ); // You can't think of anything you know offhand.
							}
							else
							{
								from.CloseGump( typeof( AnimalLoreGump ) );
								from.SendGump( new AnimalLoreGump( c ) );
							}
						}
						else
						{
							from.SendLocalizedMessage( 500329 ); // That's not an animal!
						}
					}
					else
					{
						from.SendLocalizedMessage( 500331 ); // The spirits of the dead are not the province of animal lore.
					}
				}
				else
				{
					from.SendLocalizedMessage( 500329 ); // That's not an animal!
				}
			}
		}
	}

	public class AnimalLoreGump : Gump
	{
		private static string FormatSkill( BaseCreature c, SkillName name )
		{
			Skill skill = c.Skills[name];

			if ( skill.Base < 10.0 )
				return "<div align=right>---</div>";

			return String.Format( "<div align=right>{0:F1}</div>", skill.Value );
		}

		private static string FormatAttributes( int cur, int max )
		{
			if ( max == 0 )
				return "<div align=right>---</div>";

			return String.Format( "<div align=right>{0}/{1}</div>", cur, max );
		}

		private static string FormatStat( int val )
		{
			if ( val == 0 )
				return "<div align=right>---</div>";

			return String.Format( "<div align=right>{0}</div>", val );
		}

		private static string FormatDouble( double val )
		{
			if ( val == 0 )
				return "<div align=right>---</div>";

			return String.Format( "<div align=right>{0:F1}</div>", val );
		}

		private static string FormatElement( int val )
		{
			if ( val <= 0 )
				return "<div align=right>---</div>";

			return String.Format( "<div align=right>{0}%</div>", val );
		}

		private const int LabelColor = 0x24E5;

		public AnimalLoreGump( BaseCreature c ) : base( 250, 50 )
		{
			AddPage( 0 );

			AddImage( 100, 100, 2080 );
			AddImage( 118, 137, 2081 );
			AddImage( 118, 207, 2081 );
			AddImage( 118, 277, 2081 );
			AddImage( 118, 347, 2083 );

			AddHtml( 147, 108, 210, 18, String.Format( "<center><i>{0}</i></center>", c.Name ), false, false );

			AddButton( 240, 77, 2093, 2093, 2, GumpButtonType.Reply, 0 );

			AddImage( 140, 138, 2091 );
			AddImage( 140, 335, 2091 );

			int pages = ( Core.AOS ? 5 : 3 );
			int page = 0;


			#region Attributes
			AddPage( ++page );

			AddImage( 128, 152, 2086 );
			AddHtmlLocalized( 147, 150, 160, 18, 1049593, 200, false, false ); // Attributes

			AddHtmlLocalized( 153, 168, 160, 18, 1049578, LabelColor, false, false ); // Hits
			AddHtml( 280, 168, 75, 18, FormatAttributes( c.Hits, c.HitsMax ), false, false );

			AddHtmlLocalized( 153, 186, 160, 18, 1049579, LabelColor, false, false ); // Stamina
			AddHtml( 280, 186, 75, 18, FormatAttributes( c.Stam, c.StamMax ), false, false );

			AddHtmlLocalized( 153, 204, 160, 18, 1049580, LabelColor, false, false ); // Mana
			AddHtml( 280, 204, 75, 18, FormatAttributes( c.Mana, c.ManaMax ), false, false );

			AddHtmlLocalized( 153, 222, 160, 18, 1028335, LabelColor, false, false ); // Strength
			AddHtml( 320, 222, 35, 18, FormatStat( c.Str ), false, false );

			AddHtmlLocalized( 153, 240, 160, 18, 3000113, LabelColor, false, false ); // Dexterity
			AddHtml( 320, 240, 35, 18, FormatStat( c.Dex ), false, false );

			AddHtmlLocalized( 153, 258, 160, 18, 3000112, LabelColor, false, false ); // Intelligence
			AddHtml( 320, 258, 35, 18, FormatStat( c.Int ), false, false );

			if ( Core.AOS )
			{
				int y = 276;

				if ( Core.SE )
				{
					double bd = Items.BaseInstrument.GetBaseDifficulty( c );
					if ( c.Uncalmable )
						bd = 0;

					AddHtmlLocalized( 153, 276, 160, 18, 1070793, LabelColor, false, false ); // Barding Difficulty
					AddHtml( 320, y, 35, 18, FormatDouble( bd ), false, false );

					y += 18;
				}

				AddImage( 128, y + 2, 2086 );
				AddHtmlLocalized( 147, y, 160, 18, 1049594, 200, false, false ); // Loyalty Rating
				y += 18;

				AddHtmlLocalized( 153, y, 160, 18, (!c.Controlled || c.Loyalty == 0) ? 1061643 : 1049595 + (c.Loyalty / 10), LabelColor, false, false );
			}
			else
			{
				AddImage( 128, 278, 2086 );
				AddHtmlLocalized( 147, 276, 160, 18, 3001016, 200, false, false ); // Miscellaneous

				AddHtmlLocalized( 153, 294, 160, 18, 1049581, LabelColor, false, false ); // Armor Rating
				AddHtml( 320, 294, 35, 18, FormatStat( c.VirtualArmor ), false, false );
			}

			AddButton( 340, 358, 5601, 5605, 0, GumpButtonType.Page, page + 1 );
			AddButton( 317, 358, 5603, 5607, 0, GumpButtonType.Page, pages );
			#endregion

			#region Resistances
			if ( Core.AOS )
			{
				AddPage( ++page );

				AddImage( 128, 152, 2086 );
				AddHtmlLocalized( 147, 150, 160, 18, 1061645, 200, false, false ); // Resistances

				AddHtmlLocalized( 153, 168, 160, 18, 1061646, LabelColor, false, false ); // Physical
				AddHtml( 320, 168, 35, 18, FormatElement( c.PhysicalResistance ), false, false );

				AddHtmlLocalized( 153, 186, 160, 18, 1061647, LabelColor, false, false ); // Fire
				AddHtml( 320, 186, 35, 18, FormatElement( c.FireResistance ), false, false );

				AddHtmlLocalized( 153, 204, 160, 18, 1061648, LabelColor, false, false ); // Cold
				AddHtml( 320, 204, 35, 18, FormatElement( c.ColdResistance ), false, false );

				AddHtmlLocalized( 153, 222, 160, 18, 1061649, LabelColor, false, false ); // Poison
				AddHtml( 320, 222, 35, 18, FormatElement( c.PoisonResistance ), false, false );

				AddHtmlLocalized( 153, 240, 160, 18, 1061650, LabelColor, false, false ); // Energy
				AddHtml( 320, 240, 35, 18, FormatElement( c.EnergyResistance ), false, false );

				AddButton( 340, 358, 5601, 5605, 0, GumpButtonType.Page, page + 1 );
				AddButton( 317, 358, 5603, 5607, 0, GumpButtonType.Page, page - 1 );
			}
			#endregion

			#region Damage
			if ( Core.AOS )
			{
				AddPage( ++page );

				AddImage( 128, 152, 2086 );
				AddHtmlLocalized( 147, 150, 160, 18, 1017319, 200, false, false ); // Damage

				AddHtmlLocalized( 153, 168, 160, 18, 1061646, LabelColor, false, false ); // Physical
				AddHtml( 320, 168, 35, 18, FormatElement( c.PhysicalDamage ), false, false );

				AddHtmlLocalized( 153, 186, 160, 18, 1061647, LabelColor, false, false ); // Fire
				AddHtml( 320, 186, 35, 18, FormatElement( c.FireDamage ), false, false );

				AddHtmlLocalized( 153, 204, 160, 18, 1061648, LabelColor, false, false ); // Cold
				AddHtml( 320, 204, 35, 18, FormatElement( c.ColdDamage ), false, false );

				AddHtmlLocalized( 153, 222, 160, 18, 1061649, LabelColor, false, false ); // Poison
				AddHtml( 320, 222, 35, 18, FormatElement( c.PoisonDamage ), false, false );

				AddHtmlLocalized( 153, 240, 160, 18, 1061650, LabelColor, false, false ); // Energy
				AddHtml( 320, 240, 35, 18, FormatElement( c.EnergyDamage ), false, false );

				AddButton( 340, 358, 5601, 5605, 0, GumpButtonType.Page, page + 1 );
				AddButton( 317, 358, 5603, 5607, 0, GumpButtonType.Page, page - 1 );
			}
			#endregion

			#region Skills
			AddPage( ++page );

			AddImage( 128, 152, 2086 );
			AddHtmlLocalized( 147, 150, 160, 18, 3001030, 200, false, false ); // Combat Ratings

			AddHtmlLocalized( 153, 168, 160, 18, 1044103, LabelColor, false, false ); // Wrestling
			AddHtml( 320, 168, 35, 18, FormatSkill( c, SkillName.Wrestling ), false, false );

			AddHtmlLocalized( 153, 186, 160, 18, 1044087, LabelColor, false, false ); // Tactics
			AddHtml( 320, 186, 35, 18, FormatSkill( c, SkillName.Tactics ), false, false );

			AddHtmlLocalized( 153, 204, 160, 18, 1044086, LabelColor, false, false ); // Magic Resistance
			AddHtml( 320, 204, 35, 18, FormatSkill( c, SkillName.MagicResist ), false, false );

			AddHtmlLocalized( 153, 222, 160, 18, 1044061, LabelColor, false, false ); // Anatomy
			AddHtml( 320, 222, 35, 18, FormatSkill( c, SkillName.Anatomy ), false, false );

			AddHtmlLocalized( 153, 240, 160, 18, 1044090, LabelColor, false, false ); // Poisoning
			AddHtml( 320, 240, 35, 18, FormatSkill( c, SkillName.Poisoning ), false, false );

			AddImage( 128, 260, 2086 );
			AddHtmlLocalized( 147, 258, 160, 18, 3001032, 200, false, false ); // Lore & Knowledge

			AddHtmlLocalized( 153, 276, 160, 18, 1044085, LabelColor, false, false ); // Magery
			AddHtml( 320, 276, 35, 18, FormatSkill( c, SkillName.Magery ), false, false );

			AddHtmlLocalized( 153, 294, 160, 18, 1044076, LabelColor, false, false ); // Evaluating Intelligence
			AddHtml( 320, 294, 35, 18,FormatSkill( c, SkillName.EvalInt ), false, false );

			AddHtmlLocalized( 153, 312, 160, 18, 1044106, LabelColor, false, false ); // Meditation
			AddHtml( 320, 312, 35, 18, FormatSkill( c, SkillName.Meditation ), false, false );

			AddButton( 340, 358, 5601, 5605, 0, GumpButtonType.Page, page + 1 );
			AddButton( 317, 358, 5603, 5607, 0, GumpButtonType.Page, page - 1 );
			#endregion

			#region Misc
			AddPage( ++page );

			AddImage( 128, 152, 2086 );
			AddHtmlLocalized( 147, 150, 160, 18, 1049563, 200, false, false ); // Preferred Foods

			int foodPref = 3000340;

			if ( (c.FavoriteFood & FoodType.FruitsAndVegies) != 0 )
				foodPref = 1049565; // Fruits and Vegetables
			else if ( (c.FavoriteFood & FoodType.GrainsAndHay) != 0 )
				foodPref = 1049566; // Grains and Hay
			else if ( (c.FavoriteFood & FoodType.Fish) != 0 )
				foodPref = 1049568; // Fish
			else if ( (c.FavoriteFood & FoodType.Meat) != 0 )
				foodPref = 1049564; // Meat

			AddHtmlLocalized( 153, 168, 160, 18, foodPref, LabelColor, false, false );

			AddImage( 128, 188, 2086 );
			AddHtmlLocalized( 147, 186, 160, 18, 1049569, 200, false, false ); // Pack Instincts

			int packInstinct = 3000340;

			if ( (c.PackInstinct & PackInstinct.Canine) != 0 )
				packInstinct = 1049570; // Canine
			else if ( (c.PackInstinct & PackInstinct.Ostard) != 0 )
				packInstinct = 1049571; // Ostard
			else if ( (c.PackInstinct & PackInstinct.Feline) != 0 )
				packInstinct = 1049572; // Feline
			else if ( (c.PackInstinct & PackInstinct.Arachnid) != 0 )
				packInstinct = 1049573; // Arachnid
			else if ( (c.PackInstinct & PackInstinct.Daemon) != 0 )
				packInstinct = 1049574; // Daemon
			else if ( (c.PackInstinct & PackInstinct.Bear) != 0 )
				packInstinct = 1049575; // Bear
			else if ( (c.PackInstinct & PackInstinct.Equine) != 0 )
				packInstinct = 1049576; // Equine
			else if ( (c.PackInstinct & PackInstinct.Bull) != 0 )
				packInstinct = 1049577; // Bull

			AddHtmlLocalized( 153, 204, 160, 18, packInstinct, LabelColor, false, false );

			if ( !Core.AOS )
			{
				AddImage( 128, 224, 2086 );
				AddHtmlLocalized( 147, 222, 160, 18, 1049594, 200, false, false ); // Loyalty Rating

				AddHtmlLocalized( 153, 240, 160, 18, (!c.Controlled || c.Loyalty == 0) ? 1061643 : 1049595 + (c.Loyalty / 10), LabelColor, false, false );
			}

			AddButton( 340, 358, 5601, 5605, 0, GumpButtonType.Page, 1 );
			AddButton( 317, 358, 5603, 5607, 0, GumpButtonType.Page, page - 1 );
			#endregion
		}
	}
}

:Dany help will be greatly welcumed:D
and thx for a great scrip......+karma to you.......
 

Jerbal

Sorceror
jacquesc1;806376 said:
the errors wen starting runuo

Code:
Errors:
 + Skills/AnimalLore.cs:
    CS0103: Line 138: The name 'm_bc' does not exist in the current context

Add:
Code:
 private BaseCreature m_bc;
under:
Code:
public class AnimalLoreGump : Gump
	{

jacquesc1;806376 said:
the errors wen starting runuo

Code:
    CS0103: Line 336: The name 'FormatString' does not exist in the current context

Add:
Code:
        private static string FormatString(string str)
        {
            if (str.Length == 0)
                return "<div align=right>---</div>";

            return String.Format("<div align=right>{0}</div>",str);

        }
Above:
Code:
private const int LabelColor = 0x24E5;


jacquesc1;806376 said:
the errors wen starting runuo

Code:
    CS0103: Line 384: The name 'm' does not exist in the current context

Change:
Code:
public AnimalLoreGump( BaseCreature c ) : base( 250, 50 )

to:
Code:
public AnimalLoreGump( BaseCreature c, Mobile m ) : base( 250, 50 )


That was easy to fix, just do some simple debugging. Check the merge again.
 
Top