public TamersLittleHelperGump(Mobile from, TamersLittleHelper tlh) : base(25, 25)
        {
            m_From = from;
            m_TLH  = tlh;

            m_From.CloseGump(typeof(TamersLittleHelperGump));

            AddPage(0);

            AddBackground(50, 10, 455, 199, 5054);
            AddImageTiled(58, 20, 438, 180, 2624);
            AddAlphaRegion(58, 20, 438, 180);

            AddLabel(225, 25, 88, "Taming Target Menu");

            AddButton(75, 50, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddLabel(125, 50, 0x486, "Skill 0 - 11");

            AddButton(75, 75, 4005, 4007, 2, GumpButtonType.Reply, 0);
            AddLabel(125, 75, 0x486, "Skill 11 - 23");

            AddButton(75, 100, 4005, 4007, 3, GumpButtonType.Reply, 0);
            AddLabel(125, 100, 0x486, "Skill 23 - 35");

            AddButton(75, 125, 4005, 4007, 4, GumpButtonType.Reply, 0);
            AddLabel(125, 125, 0x486, "Skill 35 - 41");

            AddButton(75, 150, 4005, 4007, 5, GumpButtonType.Reply, 0);
            AddLabel(125, 150, 0x486, "Skill 41 - 47");

            AddButton(75, 175, 4005, 4007, 6, GumpButtonType.Reply, 0);
            AddLabel(125, 175, 0x486, "Skill  47 - 59");

            AddButton(275, 50, 4005, 4007, 7, GumpButtonType.Reply, 0);
            AddLabel(325, 50, 0x486, "Skill  59 - 65");

            AddButton(275, 75, 4005, 4007, 8, GumpButtonType.Reply, 0);
            AddLabel(325, 75, 0x486, "Skill  65 - 70");

            AddButton(275, 100, 4005, 4007, 9, GumpButtonType.Reply, 0);
            AddLabel(325, 100, 0x486, "Skill  70 - 80");

            AddButton(275, 125, 4005, 4007, 10, GumpButtonType.Reply, 0);
            AddLabel(325, 125, 0x486, "Skill  80 - 90");

            AddButton(275, 150, 4005, 4007, 11, GumpButtonType.Reply, 0);
            AddLabel(325, 150, 0x486, "Skill  90 - 100");

            AddButton(275, 175, 4005, 4007, 12, GumpButtonType.Reply, 0);
            AddLabel(325, 175, 0x486, "Skill  100 - 120");
        }
Exemplo n.º 2
0
        public static void SummonTamable(TamersLittleHelper tlh, Mobile m_From)
        {
            if (m_From == null || tlh == null)
            {
                return;
            }

            if (tlh.InUseBy == null)
            {
                m_From.SendMessage("Someone else used this taming helper while you were idle. Double click it again to resume taming.");

                return;
            }

            if (m_From.Serial != tlh.InUseBy.Serial)
            {
                m_From.SendMessage("You have left this machine idle too long and {0} has taken it over!", tlh.InUseBy.Name);

                return;
            }

            if (!m_From.Alive)
            {
                m_From.SendMessage("Ghosts can not use this taming helper.");
                tlh.InUseBy = null;

                return;
            }

            tlh.LastUsed = DateTime.Now;

            double theirSkill = m_From.Skills[SkillName.AnimalTaming].Value;

            if (theirSkill >= tlh.MaxSkillAllowed)
            {
                return;
            }

            if (theirSkill <= 11)
            {
                Mobile TamingMountainGoat = new TamingMountainGoat();
                TamingMountainGoat.MoveToWorld(m_From.Location, m_From.Map);
            }
            else if (theirSkill > 11 && theirSkill <= 23)
            {
                Mobile TamingSheep = new TamingSheep();
                TamingSheep.MoveToWorld(m_From.Location, m_From.Map);
            }
            else if (theirSkill > 23 && theirSkill <= 35)
            {
                Mobile TamingTimberWolf = new TamingTimberWolf();
                TamingTimberWolf.MoveToWorld(m_From.Location, m_From.Map);
            }
            else if (theirSkill > 35 && theirSkill <= 41)
            {
                Mobile TamingBlackBear = new TamingBlackBear();
                TamingBlackBear.MoveToWorld(m_From.Location, m_From.Map);
            }
            else if (theirSkill > 41 && theirSkill <= 47)
            {
                Mobile TamingBrownBear = new TamingBrownBear();
                TamingBrownBear.MoveToWorld(m_From.Location, m_From.Map);
            }
            else if (theirSkill > 47 && theirSkill <= 59)
            {
                Mobile TamingAlligator = new TamingAlligator();
                TamingAlligator.MoveToWorld(m_From.Location, m_From.Map);
            }
            else if (theirSkill > 59 && theirSkill <= 65)
            {
                Mobile TamingGreatHart = new TamingGreatHart();
                TamingGreatHart.MoveToWorld(m_From.Location, m_From.Map);
            }
            else if (theirSkill > 65 && theirSkill <= 70)
            {
                Mobile TamingGrizzlyBear = new TamingGrizzlyBear();
                TamingGrizzlyBear.MoveToWorld(m_From.Location, m_From.Map);
            }
            else if (theirSkill > 70 && theirSkill <= 80)
            {
                Mobile TamingBull = new TamingBull();
                TamingBull.MoveToWorld(m_From.Location, m_From.Map);
            }
            else if (theirSkill > 80 && theirSkill <= 90)
            {
                Mobile TamingGiantToad = new TamingGiantToad();
                TamingGiantToad.MoveToWorld(m_From.Location, m_From.Map);
            }
            else if (theirSkill > 90 && theirSkill <= 100)
            {
                Mobile TamingBakeKitsune = new TamingBakeKitsune();
                TamingBakeKitsune.MoveToWorld(m_From.Location, m_From.Map);
            }
            else if (theirSkill > 100.0)
            {
                Mobile TamingHiryu = new TamingHiryu();
                TamingHiryu.MoveToWorld(m_From.Location, m_From.Map);
            }
            else
            {
                m_From.SendLocalizedMessage(502694);                   // Cancelled action.
                tlh.InUseBy = null;
            }
        }