예제 #1
0
        public Mustang(MustangInfo info) : base(info.Name, 0xCC, 0x3EA2, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
        {
            BaseSoundID = 0xA8;

            SetStr(100, 180);
            SetDex(90, 130);
            SetInt(6, 10);

            SetHits(100, 180);
            SetMana(0);

            SetDamage(6, 8);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 40);
            SetResistance(ResistanceType.Fire, 30, 40);
            SetResistance(ResistanceType.Cold, 30, 40);
            SetResistance(ResistanceType.Poison, 30, 40);
            SetResistance(ResistanceType.Energy, 30, 40);

            SetSkill(SkillName.MagicResist, 40.0);
            SetSkill(SkillName.Tactics, 40.0);
            SetSkill(SkillName.Wrestling, 50.0);

            Fame  = 600;
            Karma = -266;

            Tamable      = true;
            ControlSlots = 2;

            info.ApplyTo(this);
        }
예제 #2
0
        public Mustang(MustangInfo info) : base(info.Name, 0xCC, 0x3EA2, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
        {
			BaseSoundID = 0xA8;

			SetStr( 100, 180 );
			SetDex( 90, 130 );
			SetInt( 6, 10 );

			SetHits( 100, 180 );
			SetMana( 0 );

			SetDamage( 6, 8 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 40 );
			SetResistance( ResistanceType.Fire, 30, 40 );
			SetResistance( ResistanceType.Cold, 30, 40 );
			SetResistance( ResistanceType.Poison, 30, 40 );
			SetResistance( ResistanceType.Energy, 30, 40 );

			SetSkill( SkillName.MagicResist, 40.0 );
			SetSkill( SkillName.Tactics, 40.0 );
			SetSkill( SkillName.Wrestling, 50.0 );

			Fame = 600;
			Karma = -266;

			Tamable = true;
			ControlSlots = 2;

			info.ApplyTo( this );
		}
예제 #3
0
            private void MakeGump()
            {
                this.Closable   = true;
                this.Disposable = true;
                this.Dragable   = true;
                this.Resizable  = false;
                this.AddPage(0);
                this.AddBackground(0, 0, 160, 240, 9400);
                this.AddButton(15, 10, 5601, 5605, 11, GumpButtonType.Reply, 0);
                this.AddLabel(35, 8, GreenHue, @"Load");

                for (int i = 0; i < 10 && (10 * m_Page) + i < Mustangs.Count; i++)
                {
                    AddButton(15, 30 + i * 20, 5601, 5605, i + 1, GumpButtonType.Reply, 0);
                    MustangInfo info = Mustangs[10 * m_Page + i] as MustangInfo;
                    AddLabel(35, 33 + i * 20, LabelHue, info.ID);
                }

                if (m_Page > 0)
                {
                    this.AddButton(115, 10, 5603, 5607, 12, GumpButtonType.Reply, 0);
                }

                int totPages = Mustangs.Count / 10;

                if (Mustangs.Count % 10 == 0 && Mustangs.Count != 0)
                {
                    totPages--;
                }

                if (m_Page < totPages)
                {
                    this.AddButton(135, 10, 5601, 5605, 13, GumpButtonType.Reply, 0);
                }
            }
예제 #4
0
        /// <summary>
        /// Creates a mustang whose tame skill is between the range specified
        /// </summary>
        /// <param name="minSkill"></param>
        /// <param name="maxSkill"></param>
        /// <param name="mustang"></param>
        public static MustangInfo FromSkills(int minSkill, int maxSkill)
        {
            if (minSkill > maxSkill)
            {
                int temp = minSkill;
                minSkill = maxSkill;
                maxSkill = temp;
            }

            ArrayList list = new ArrayList();

            foreach (MustangInfo info in Mustangs)
            {
                if (minSkill <= info.Skill && maxSkill >= info.Skill)
                {
                    list.Add(info);
                }
            }

            MustangInfo selected = null;

            if (list.Count > 0)
            {
                selected = list[Utility.Random(list.Count)] as MustangInfo;
            }

            if (selected == null)
            {
                selected = MustangInfo.Default;
            }

            return(selected);
        }
예제 #5
0
            public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
            {
                switch (info.ButtonID)
                {
                case 11:

                    if (sender.Mobile.AccessLevel >= AccessLevel.Administrator)
                    {
                        Load();
                        sender.Mobile.SendGump(new MustangGump(sender.Mobile, 0));
                    }
                    else
                    {
                        sender.Mobile.SendGump(new MustangGump(sender.Mobile, m_Page));
                        sender.Mobile.SendMessage("Only administrators can do that");
                    }
                    break;

                case 12:                         // Previous page

                    sender.Mobile.SendGump(new MustangGump(sender.Mobile, --m_Page));
                    break;

                case 13:                         // Next page

                    sender.Mobile.SendGump(new MustangGump(sender.Mobile, ++m_Page));
                    break;

                default:

                    int index = info.ButtonID - 1;

                    if (index >= 0 && index < 10)
                    {
                        int i = m_Page * 10 + index;

                        if (i >= 0 && i < Mustangs.Count)
                        {
                            MustangInfo m = Mustangs[i] as MustangInfo;
                            sender.Mobile.Target = new MustangTarget(new object[] { m_Page, m });
                            sender.Mobile.SendMessage("Where do you wish to create the mustang?");
                        }
                    }
                    break;
                }
            }
예제 #6
0
                protected override void OnTarget(Mobile from, object targeted)
                {
                    IPoint3D    p    = targeted as IPoint3D;
                    int         page = (int)(m_state)[0];
                    MustangInfo info = (MustangInfo)(m_state)[1];

                    if (p == null)
                    {
                        from.SendMessage("Cannot create there");
                        from.SendGump(new MustangGump(from, page));
                        return;
                    }

                    Mustang m = new Mustang(info);

                    m.MoveToWorld(new Point3D(p), from.Map);
                    from.SendGump(new MustangGump(from, page));
                }
예제 #7
0
        /// <summary>
        /// Creates a mustang from its staff ID
        /// </summary>
        /// <param name="name">This can be either the staff id, or a number of ids concatenated by dots:
        /// Copper.Dull.Sky</param>
        public static MustangInfo FromString(string name)
        {
            string[]  names = name.Split('.');
            ArrayList list  = new ArrayList();

            foreach (string s in names)
            {
                MustangInfo info = Parse(s);

                if (info != null)
                {
                    list.Add(info);
                }
            }

            if (list.Count == 0)
            {
                return(MustangInfo.Default);
            }
            else
            {
                return(list[Utility.Random(list.Count)] as MustangInfo);
            }
        }