public override void OnResponse(NetState state, RelayInfo info) { switch (info.ButtonID) { default: break; case 1: if (!VendorMap.CheckVendor()) { User.SendLocalizedMessage(1154643); // That item is no longer for sale. } else if (VendorMap.SetLocation == Point3D.Zero && !VendorSearch.CanSearch(User)) { User.SendLocalizedMessage(1154680); //Before using vendor search, you must be in a justice region or a safe log-out location (such as an inn or a house which has you on its Owner, Co-owner, or Friends list). } else if (VendorMap.SetLocation == Point3D.Zero && !VendorSearch.CanSearch(User)) { User.SendLocalizedMessage(501035); // You cannot teleport from here to the destination. } else if (VendorMap.SetLocation != Point3D.Zero && (!Utility.InRange(VendorMap.SetLocation, User.Location, 100) || VendorMap.SetMap != User.Map)) { User.SendLocalizedMessage(501035); // You cannot teleport from here to the destination. } else { new Server.Spells.Fourth.RecallSpell(User, VendorMap, VendorMap).Cast(); } break; } }
public override void OnResponse(NetState state, RelayInfo info) { switch (info.ButtonID) { default: break; case 1: if (VendorMap.SetLocation != Point3D.Zero) { User.Frozen = true; DoRecall(VendorMap.SetLocation, VendorMap.SetMap); User.PublicOverheadMessage(MessageType.Spell, User.SpeechHue, true, "Kal Ort Por", false); } else if (!VendorMap.CheckVendor()) { User.SendLocalizedMessage(1154643); // That item is no longer for sale. } else if (Banker.Withdraw(User, Cost, true)) { User.Frozen = true; VendorMap.SetLocation = User.Location; VendorMap.SetMap = User.Map; User.PublicOverheadMessage(MessageType.Spell, User.SpeechHue, true, "Kal Ort Por", false); DoRecall(VendorMap.GetVendorLocation(), VendorMap.GetVendorMap()); } else { User.SendLocalizedMessage(1019022); // You do not have enough gold. } break; } }
public override void OnClick() { if (VendorMap.IsSale()) { BaseGump.SendGump(new ConfirmTeleportGump(VendorMap, (PlayerMobile)Clicker)); } else { Clicker.SendLocalizedMessage(1154700); // Item no longer for sale. } }
public override void OnResponse(NetState state, RelayInfo info) { switch (info.ButtonID) { default: break; case 1: if (!VendorMap.CheckVendor()) { User.SendLocalizedMessage(1154643); // That item is no longer for sale. } else { new Server.Spells.Fourth.RecallSpell(User, null, VendorMap).Cast(); } break; } }
public override void OnResponse(NetState state, RelayInfo info) { switch (info.ButtonID) { default: break; case 1: if (!VendorMap.CheckVendor()) { User.SendLocalizedMessage(1154643); // That item is no longer for sale. } else if (!VendorSearch.CanSearch(User)) { User.SendLocalizedMessage(1154680); //Before using vendor search, you must be in a justice region or a safe log-out location (such as an inn or a house which has you on its Owner, Co-owner, or Friends list). } else { new Server.Spells.Fourth.RecallSpell(User, null, VendorMap).Cast(); } break; } }
private void DoRecall(Point3D loc, Map map) { Timer.DelayCall(TimeSpan.FromSeconds(1.5), () => { User.Frozen = false; if (VendorMap.CheckVendor()) { User.PlaySound(0x1FC); User.MoveToWorld(loc, map); User.PlaySound(0x1FC); if (loc == VendorMap.SetLocation && !VendorMap.Deleted) { VendorMap.Delete(); } } else { User.SendLocalizedMessage(1154700); // Item no longer for sale. } }); }
public override void OnClick() { VendorMap.DisplayTo(Clicker); }