Exemple #1
0
        public override void OnDoubleClick(Mobile from)
        {
            if (Movable)
            {
                from.SendMessage("This must be secured down in a home to use.");
            }
            else if (!from.InRange(GetWorldLocation(), 2))
            {
                from.SendMessage("You will have to get closer to use that.");
            }
            else if (!CheckAccess(from))
            {
                from.SendMessage("You cannot use this safe.");
            }
            else
            {
                BankBox box = from.BankBox;
                if (box != null)
                {
                    box.GumpID = BaseContainer.BankGump(from, box);
                    box.Open();
                }
            }

            return;
        }
 public override void OnDoubleClick(Mobile from)
 {
     if (Charges > 0)
     {
         ConsumeCharge(from);
         BankBox box = from.BankBox;
         if (box != null)
         {
             box.GumpID = BaseContainer.BankGump(from, box);
             box.Open();
         }
     }
 }
Exemple #3
0
 public override void OnDoubleClick(Mobile from)
 {
     if (from.InRange(this.GetWorldLocation(), 4))
     {
         BankBox box = from.BankBox;
         if (box != null)
         {
             box.GumpID = BaseContainer.BankGump(from, box);
             box.Open();
         }
     }
     else
     {
         from.SendLocalizedMessage(502138);                   // That is too far away for you to use
     }
 }