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.Open(); } } return; }
public override void OnDoubleClick(Mobile from) { PlayerMobile pm = from as PlayerMobile; if (from.Criminal) { from.SendMessage("Thou art a criminal and cannot access thy bank box."); } else { BankBox box = from.BankBox; if (box != null) { box.Open(); } } { from.SendLocalizedMessage(500446); // That is too far away. } }
public override void OnDoubleClick(Mobile from) { if (from.Region is TownRegion) { from.SendMessage("You are not allowed to use this in town"); } else { if (IsChildOf(from.Backpack)) { BankBox box = from.BankBox; if (box != null) { box.Open(); } else { from.SendMessage("An internal error has occurred. You need to report this to a system Administrator."); } } else { from.SendMessage("This item must be in your pack before you are able to use it"); } } }
public override void OnDoubleClick(Mobile from) { if (!from.Alive) { return; } if (!from.InRange(this.GetWorldLocation(), 3)) { from.SendMessage("You are too far away to ring the banker's podium bell."); return; } if (NextUse > TimeSpan.Zero) { from.SendMessage("The magical bank clerk is busy at the moment. Try back later."); return; } if (from.Criminal) { from.SendMessage("Thou art a criminal and cannot access thy bank box."); } else { BankBox box = from.BankBox; if (box != null) { box.Open(); NextUse = m_Delay; } } }
public override void OnDoubleClick(Mobile from) { PlayerMobile pm = from as PlayerMobile; if (!IsChildOf(from.Backpack)) { from.SendMessage("This item must be in your pack before you are able to use it"); } else { #region If Charge Is Less Than OR Equal To '0' Box Wont Open if (Charges <= 0) { from.SendMessage("You need to recharge this before you are able to use it again!"); } #endregion If Charge Is Less Than OR Equal To '0' Box Wont Open else { BankBox box = from.BankBox; if (box != null) { box.Open(); } #region This Decreases The Number Of Charges After Using Item Charges--; #endregion This Decreases The Number Of Charges After Using Item } } }
public override void OnDoubleClick(Mobile from) { //from.Handled = true; BankBox box = from.BankBox; if (box != null) { box.Open(); } }
public override void OnDoubleClick(Mobile from) { if (Charges > 0) { ConsumeCharge(from); BankBox box = from.BankBox; if (box != null) { box.Open(); } } }
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(); } } }
public override void OnDoubleClick(Mobile from) { if (this.Movable == true) { from.SendMessage("This must be locked down to use!"); return; } BankBox box = from.BankBox; if (box != null) { box.Open(); } }
public override void OnDoubleClick(Mobile from) { if (!IsChildOf(from.Backpack)) { from.SendMessage("This item must be in your pack before you are able to use it"); } else { BankBox box = from.BankBox; if (box != null) { box.Open(); } } }
public void DoOpenBank(Mobile from, BankToken bt) { BankBox box = from.BankBox; if (box != null) { box.Open(); bt.Charges--; bt.Name = "A bank token. Charges: " + Charges + " Recharges left: " + (MaxCharges - Recharges); } else { from.SendMessage("Please page a gm immediately... you seem to have misplaced your bankbox....Boggle!"); } }
public override void OnDoubleClick(Mobile from) { if (from.InRange(this.GetWorldLocation(), 4)) { BankBox box = from.BankBox; if (box != null) { box.Open(); } } else { from.SendLocalizedMessage(502138); // That is too far away for you to use } }
public override void OnDoubleClick(Mobile m) { BaseHouse house = BaseHouse.FindHouseAt(this); if (house != null && house.IsLockedDown(this)) { BankBox box = m.BankBox; if (box != null) { box.Open(); } } //public override int DefaultGumpID{ get{ return 0x49; } } //public override int DefaultDropSound{ get{ return 0x42; } } }
public override void OnDoubleClick(Mobile from) { PlayerMobile pm = from as PlayerMobile; if (from.Criminal) { from.SendMessage("Thou art a criminal and cannot access thy bank box."); } else if (IsChildOf(from.Backpack)) { BankBox box = from.BankBox; if (box != null) { box.Open(); } } else { from.SendMessage("This must be in your backpack."); } }
public override void OnDoubleClick(Mobile from) { if (from.InRange(this.GetWorldLocation(), 4)) { BankBox box = from.BankBox; if (from.Criminal) { from.SendMessage("Thou canst not deposit or withdraw from thy bank box if thou art a criminal!"); } else if (box != null) { box.Open(); } else { from.SendMessage("Error! Thy bank box was not found!"); } } else { from.SendLocalizedMessage(500446); // That is too far away. } }
public override void OnSpeech(SpeechEventArgs e) { if (!e.Handled && e.Mobile.InLOS(this)) { for (int i = 0; i < e.Keywords.Length; ++i) { int keyword = e.Keywords[i]; switch (keyword) { case 0x0000: // *withdraw* { e.Handled = true; string[] split = e.Speech.Split(' '); if (split.Length >= 2) { int amount; try { amount = Convert.ToInt32(split[1]); } catch { break; } if (amount > 5000) { this.Say(500381); // Thou canst not withdraw so much at one time! } else if (amount > 0) { BankBox box = e.Mobile.BankBox; if (box == null || !box.ConsumeTotal(typeof(Gold), amount)) { this.Say(500384); // Ah, art thou trying to fool me? Thou hast not so much gold! } else { e.Mobile.AddToBackpack(new Gold(amount)); this.Say(1010005); // Thou hast withdrawn gold from thy account. } } } break; } case 0x0001: // *balance* { e.Handled = true; BankBox box = e.Mobile.BankBox; if (box != null) { this.Say(String.Format("Thy current bank balance is {0} gold.", box.TotalGold.ToString())); } break; } case 0x0002: // *bank* { e.Handled = true; BankBox box = e.Mobile.BankBox; if (box != null) { box.Open(); } break; } case 0x0003: // *check* { e.Handled = true; string[] split = e.Speech.Split(' '); if (split.Length >= 2) { int amount; try { amount = Convert.ToInt32(split[1]); } catch { break; } if (amount < 5000) { this.Say(1010006); // We cannot create checks for such a paltry amount of gold! } else if (amount > 1000000) { this.Say(1010007); // Our policies prevent us from creating checks worth that much! } else { BankCheck check = new BankCheck(amount); BankBox box = e.Mobile.BankBox; if (box == null || !box.TryDropItem(e.Mobile, check, false)) { this.Say(500386); // There's not enough room in your bankbox for the check! check.Delete(); } else if (!box.ConsumeTotal(typeof(Gold), amount)) { this.Say(500384); // Ah, art thou trying to fool me? Thou hast not so much gold! check.Delete(); } else { this.Say(String.Format("Into your bank box I have placed a check in the amount of: {0}", amount.ToString())); } } } break; } } } } base.OnSpeech(e); }