コード例 #1
0
 public override void OnResponse(NetState state, RelayInfo info)
 {
     if (info.ButtonID == 1)
     {
         Mobile TamingMountainGoat = new TamingMountainGoat(m_From);
         TamingMountainGoat.MoveToWorld(m_From.Location, m_From.Map);
         m_TLH.Delete();
     }
     else if (info.ButtonID == 2)
     {
         Mobile TamingSheep = new TamingSheep(m_From);
         TamingSheep.MoveToWorld(m_From.Location, m_From.Map);
         m_TLH.Delete();
     }
     else if (info.ButtonID == 3)
     {
         Mobile TamingTimberWolf = new TamingTimberWolf(m_From);
         TamingTimberWolf.MoveToWorld(m_From.Location, m_From.Map);
         m_TLH.Delete();
     }
     else if (info.ButtonID == 4)
     {
         Mobile TamingBlackBear = new TamingBlackBear(m_From);
         TamingBlackBear.MoveToWorld(m_From.Location, m_From.Map);
         m_TLH.Delete();
     }
     else if (info.ButtonID == 5)
     {
         Mobile TamingBrownBear = new TamingBrownBear(m_From);
         TamingBrownBear.MoveToWorld(m_From.Location, m_From.Map);
         m_TLH.Delete();
     }
     else if (info.ButtonID == 6)
     {
         Mobile TamingAlligator = new TamingAlligator(m_From);
         TamingAlligator.MoveToWorld(m_From.Location, m_From.Map);
         m_TLH.Delete();
     }
     else if (info.ButtonID == 7)
     {
         Mobile TamingGreatHart = new TamingGreatHart(m_From);
         TamingGreatHart.MoveToWorld(m_From.Location, m_From.Map);
         m_TLH.Delete();
     }
     else if (info.ButtonID == 8)
     {
         Mobile TamingGrizzlyBear = new TamingGrizzlyBear(m_From);
         TamingGrizzlyBear.MoveToWorld(m_From.Location, m_From.Map);
         m_TLH.Delete();
     }
     else if (info.ButtonID == 9)
     {
         Mobile TamingBull = new TamingBull(m_From);
         TamingBull.MoveToWorld(m_From.Location, m_From.Map);
         m_TLH.Delete();
     }
     else if (info.ButtonID == 10)
     {
         Mobile TamingGiantToad = new TamingGiantToad(m_From);
         TamingGiantToad.MoveToWorld(m_From.Location, m_From.Map);
         m_TLH.Delete();
     }
     else if (info.ButtonID == 11)
     {
         Mobile TamingBakeKitsune = new TamingBakeKitsune(m_From);
         TamingBakeKitsune.MoveToWorld(m_From.Location, m_From.Map);
         m_TLH.Delete();
     }
     else if (info.ButtonID == 12)
     {
         Mobile TamingHiryu = new TamingHiryu(m_From);
         TamingHiryu.MoveToWorld(m_From.Location, m_From.Map);
         m_TLH.Delete();
     }
     else
     {
         m_From.SendLocalizedMessage(502694);                   // Cancelled action.
     }
 }
コード例 #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;
            }
        }