public ClaimListGump(HitchingPost post, Mobile from, List <BaseCreature> list)
                : base(50, 50)
            {
                m_Post = post;
                m_From = from;
                m_List = list;

                from.CloseGump(typeof(ClaimListGump));

                AddPage(0);

                AddBackground(0, 0, 325, 50 + (list.Count * 20), 9250);
                AddAlphaRegion(5, 5, 315, 40 + (list.Count * 20));

                AddHtml(15, 15, 275, 20, "<BASEFONT COLOR=#FFFFFF>Select a pet to retrieve from the stables:</BASEFONT>", false, false);

                for (int i = 0; i < list.Count; ++i)
                {
                    BaseCreature pet = list[i];

                    if (pet == null || pet.Deleted)
                    {
                        continue;
                    }

                    AddButton(15, 39 + (i * 20), 10006, 10006, i + 1, GumpButtonType.Reply, 0);
                    AddHtml(32, 35 + (i * 20), 275, 18, String.Format("<BASEFONT COLOR=#C0C0EE>{0}</BASEFONT>", pet.Name), false, false);
                }
            }
Exemple #2
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (m_Rope.Deleted)
                {
                    return;
                }

                if (!from.InRange(m_Rope.GetWorldLocation(), 2))
                {
                    from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045);                       // I can't reach that.
                }

                else if (targeted is HitchingPostAnniversary)
                {
                    HitchingPostAnniversary postItem = (HitchingPostAnniversary)targeted;
                    if (postItem.UsesRemaining >= 1)
                    {
                        from.SendMessage("Hitching Rope cannot be applied at this time", 0x59);
                    }

                    else
                    {
                        postItem.UsesRemaining += 30;
                        m_Rope.Delete();

                        if (postItem is Item)
                        {
                            from.SendMessage("You apply the Hitching Rope and can now use it once again");
                        }
                    }
                }
                else if (targeted is HitchingPost)
                {
                    HitchingPost postItem = (HitchingPost)targeted;

                    if (postItem.UsesRemaining >= 1)
                    {
                        from.SendMessage("Hitching Rope cannot be applied at this time", 0x59);
                    }
                    else if (postItem.Charges <= 0 && postItem.UsesRemaining <= 0)
                    {
                        from.SendLocalizedMessage(1071157);                           // This hitching post is damaged. You can't use it any longer.
                    }
                    else
                    {
                        postItem.Charges       -= 1;
                        postItem.UsesRemaining += 15;
                        m_Rope.Delete();

                        if (postItem is Item)
                        {
                            from.SendMessage("You apply the Hitching Rope and can now use it once again");
                        }
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1062020);                       // That has no effect.
                }
            }
 public StableEntry(HitchingPost post, Mobile from)
     : base(6126, 12)
 {
     m_Post = post;
     m_From = from;
 }
 public StableTarget(HitchingPost post)
     : base(12, false, TargetFlags.None)
 {
     m_Post = post;
 }
Exemple #5
0
 public StableTarget(HitchingPost post)
     : base(12, false, TargetFlags.None)
 {
     this.m_Post = post;
 }
Exemple #6
0
            public ClaimListGump(HitchingPost post, Mobile from, List<BaseCreature> list)
                : base(50, 50)
            {
                this.m_Post = post;
                this.m_From = from;
                this.m_List = list;

                from.CloseGump(typeof(ClaimListGump));

                this.AddPage(0);

                this.AddBackground(0, 0, 325, 50 + (list.Count * 20), 9250);
                this.AddAlphaRegion(5, 5, 315, 40 + (list.Count * 20));

                this.AddHtml(15, 15, 275, 20, "<BASEFONT COLOR=#FFFFFF>Select a pet to retrieve from the stables:</BASEFONT>", false, false);

                for (int i = 0; i < list.Count; ++i)
                {
                    BaseCreature pet = list[i];

                    if (pet == null || pet.Deleted)
                        continue;

                    this.AddButton(15, 39 + (i * 20), 10006, 10006, i + 1, GumpButtonType.Reply, 0);
                    this.AddHtml(32, 35 + (i * 20), 275, 18, String.Format("<BASEFONT COLOR=#C0C0EE>{0}</BASEFONT>", pet.Name), false, false);
                }
            }
Exemple #7
0
 public StableEntry(HitchingPost post, Mobile from)
     : base(6126, 12)
 {
     this.m_Post = post;
     this.m_From = from;
 }
 		public HitchingPostTarget( HitchingPost charge ) : base ( 10, false, TargetFlags.None ) 
 		{ 
    			m_Powder=charge; 
 		} 
 public unHitchTarget( HitchingPost post )
     : base(2, false, TargetFlags.None)
 {
     m_Post = post;
 }
Exemple #10
0
 public HitchingPostTarget(Item i) : base(3, false, TargetFlags.None)
 {
     m_Post = (HitchingPost)i;
 }
 public HitchingPostFSTarget(HitchingPost charge)
     : base(10, false, TargetFlags.None)
 {
     m_Powder = charge;
 }
Exemple #12
0
			public HitchingPostTarget( Item i ) : base( 3, false, TargetFlags.None )
			{
				m_Post=(HitchingPost)i;
			}