public override void OnClick() { if (m_DockMaster.Map == null) { return; } Container pack = m_From.Backpack; if (pack != null && pack.GetAmount(typeof(Gold)) < DryDockAmount && Banker.GetBalance(m_From) < DryDockAmount) { m_DockMaster.PrivateOverheadMessage(MessageType.Regular, m_DockMaster.SpeechHue, 1116506, DryDockAmount.ToString(), m_From.NetState); //The price is ~1_price~ and I will accept nothing less! return; } BaseBoat boat = BaseBoat.GetBoat(m_From); if (boat != null && m_DockMaster.InRange(boat.Location, 50)) { m_DockMaster.TryRetrieveHold(m_From, boat); } else { m_DockMaster.SayTo(m_From, 502581); //I cannot find the ship! } }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile from = sender.Mobile; switch (info.ButtonID) { case 0: { from.SendLocalizedMessage(1042021); // Cancelled. break; } case 1: { var boat = BaseBoat.GetBoat(from); if (boat != null && !_Table.ContainsKey(from)) { _Table[from] = new AbandonTimer(from, boat); from.SendLocalizedMessage(1150111); // Your ship has been abandoned. It will decay within five minutes. } break; } } }
public override void OnClick() { BaseBoat boat = BaseBoat.GetBoat(m_From); if (boat != null && m_DockMaster.InRange(boat.Location, 100)) { boat.BeginDryDock(m_From, m_DockMaster); } else { m_DockMaster.SayTo(m_From, 502581); //I cannot find the ship! } }
public override void OnClick() { if (m_Vendor == null || m_Vendor.Deleted) { return; } BaseBoat boat = BaseBoat.GetBoat(m_From); if (boat != null) { if (Banker.Withdraw(m_From, 100, true)) { if (IsSpecialShip(boat)) { RecallRune newRune = new RecallRune(); newRune.SetGalleon((BaseGalleon)boat); m_From.AddToBackpack(newRune); m_Vendor.Say(1149580); // A recall rune to your ship has been placed in your backpack. } else { List <KeyType> list = new List <KeyType>(); foreach (KeyType type in Enum.GetValues(typeof(KeyType))) { list.Add(type); } KeyType[] Types = list.ToArray(); Key packKey = new Key(Types[Utility.Random(Types.Length)], boat.PPlank.KeyValue, boat) { MaxRange = 10, Name = "a ship key" }; m_From.AddToBackpack(packKey); } } else { m_Vendor.Say(500192); // Begging thy pardon, but thou canst not afford that. } } else { m_Vendor.Say(1116767); // The ship could not be located. } }