Пример #1
0
        private void OnBid(CommandEventArgs e)
        {
            var pm = e.Mobile as MythikPlayerMobile;

            if (m_auctionStatus != AuctionStatus.Ongoing)
            {
                e.Mobile.SendMessage("No auctions currently active.");
                return;
            }
            int bid = -1;

            int.TryParse(e.Arguments[0], out bid);
            if (bid < m_CurrentBid + 50)
            {
                e.Mobile.SendMessage("You must bid atleast 50gp more than the current bid.");
                return;
            }

            if (pm.Backpack.ConsumeTotal(typeof(Gold), bid, true) || Banker.Withdraw(pm, bid))
            {
                if (m_CurrentBidder != null)
                {
                    m_CurrentBidder.PlaceInBackpack(new BankCheck((int)(m_CurrentBid)));
                    m_CurrentBidder.SendAsciiMessage("You have been outbid and " + m_CurrentBid +
                                                     "gp has been returned to you.");
                    //return current bidders gold.
                }
                Broadcast("[" + e.Mobile.Name + "] bids " + e.Arguments[0] + " On the " + m_Item.Name);
                m_CurrentBid    = bid;
                m_CurrentBidder = pm;
                this.m_timer    = new AuctionTimer(this);
                m_timer.Start();
            }
            //consume the gold.
        }
Пример #2
0
        private void StartAuction(Item item, int price)
        {
            //-1 price cancel it.
            if (price == -1)
            {
                m_ItemOwner.SendAsciiMessage("You failed to set a valid price and your auction was cancelled.");
                EndAuction(false);
                return;
            }
            m_Item = item;

            Broadcast("Auction Starting!");
            Broadcast(item.Amount + " " + item.Name + " Price: " + price);
            m_CurrentBid = price;
            this.m_timer = new AuctionTimer(this);
            m_timer.Start();
            m_auctionStatus = AuctionStatus.Ongoing;
        }
Пример #3
0
		public Auctioneer(Serial serial)
			: base(serial)
		{
			m_Timer = new AuctionTimer(this);
			m_Timer.Start();
		}
Пример #4
0
		public Auctioneer()
			: base("the auctioneer")
		{
			m_Timer = new AuctionTimer(this);
			m_Timer.Start();
		}
Пример #5
0
 public Auctioneer(Serial serial)
     : base(serial)
 {
     m_Timer = new AuctionTimer(this);
     m_Timer.Start();
 }
Пример #6
0
 public Auctioneer()
     : base("the auctioneer")
 {
     m_Timer = new AuctionTimer(this);
     m_Timer.Start();
 }