private void SpawnTeleporter() { if (Teleporter != null) { Teleporter.Delete(); } if (this.Map == null || this.Map == Map.Internal) { return; } IPooledEnumerable eable = this.Map.GetItemsInRange(TeleporterLocation, 0); foreach (Item item in eable) { if (item is ShameTeleporter) { item.Delete(); } } eable.Free(); Teleporter = new ShameTeleporter(this, TeleporterDestination, this.Map); Teleporter.MoveToWorld(TeleporterLocation, this.Map); }
public static void SetupDespise_OnCommand(CommandEventArgs e) { if (DespiseController.Instance == null) { DespiseController.RemoveAnkh(); DespiseController controller = new DespiseController(); WeakEntityCollection.Add("despise", controller); controller.MoveToWorld(new Point3D(5571, 626, 30), Map.Trammel); DespiseAnkh ankh = new DespiseAnkh(Alignment.Good); WeakEntityCollection.Add("despise", ankh); ankh.MoveToWorld(new Point3D(5474, 525, 79), Map.Trammel); ankh = new DespiseAnkh(Alignment.Evil); WeakEntityCollection.Add("despise", ankh); ankh.MoveToWorld(new Point3D(5472, 754, 10), Map.Trammel); SetupTeleporters(); //Teleporters IPooledEnumerable eable = Map.Trammel.GetItemsInRange(new Point3D(5588, 631, 30), 2); DespiseTeleporter tele = null; //Wisp MysteriousWisp wisp = new MysteriousWisp(); WeakEntityCollection.Add("despise", wisp); wisp.MoveToWorld(new Point3D(1303, 1088, 0), Map.Trammel); foreach (Item item in eable) { if (item is Teleporter) { Teleporter old = (Teleporter)item; tele = new DespiseTeleporter(); WeakEntityCollection.Add("despise", tele); tele.PointDest = old.PointDest; tele.MapDest = old.MapDest; tele.MoveToWorld(old.Location, old.Map); old.Delete(); } } eable.Free(); e.Mobile.SendMessage("Despise setup complete"); } else { e.Mobile.SendMessage("Despise appears to already be setup"); } DespiseController.Instance.CheckSpawnersVersion3(); }
public static void SetupDespise_OnCommand(CommandEventArgs e) { if (DespiseController.Instance == null) { DespiseController controller = new DespiseController(); WeakEntityCollection.Add("despise", controller); controller.MoveToWorld(new Point3D(5571, 626, 30), Map.Trammel); DespiseAnkh ankh = new DespiseAnkh(Alignment.Good); WeakEntityCollection.Add("despise", ankh); ankh.MoveToWorld(new Point3D(5474, 525, 79), Map.Trammel); ankh = new DespiseAnkh(Alignment.Evil); WeakEntityCollection.Add("despise", ankh); ankh.MoveToWorld(new Point3D(5472, 754, 10), Map.Trammel); Moongate gate1 = new Moongate(false); Moongate gate2 = new Moongate(false); WeakEntityCollection.Add("despise", gate1); WeakEntityCollection.Add("despise", gate2); //Gate1 gate1.MoveToWorld(new Point3D(5475, 735, 5), Map.Trammel); gate2.MoveToWorld(new Point3D(5458, 610, 50), Map.Trammel); HueGates(gate1, gate2); LinkGates(gate1, gate2); gate1 = new Moongate(false); gate2 = new Moongate(false); WeakEntityCollection.Add("despise", gate1); WeakEntityCollection.Add("despise", gate2); //Gate2 gate1.MoveToWorld(new Point3D(5459, 674, 20), Map.Trammel); gate2.MoveToWorld(new Point3D(5454, 522, 60), Map.Trammel); HueGates(gate1, gate2); LinkGates(gate1, gate2); gate1 = new Moongate(false); gate2 = new Moongate(false); WeakEntityCollection.Add("despise", gate1); WeakEntityCollection.Add("despise", gate2); //Gate3 gate1.MoveToWorld(new Point3D(5388, 753, 5), Map.Trammel); gate2.MoveToWorld(new Point3D(5387, 628, 30), Map.Trammel); HueGates(gate1, gate2); LinkGates(gate1, gate2); //Teleporters IPooledEnumerable eable = Map.Trammel.GetItemsInRange(new Point3D(5588, 631, 30), 2); DespiseTeleporter tele = null; //Wisp MysteriousWisp wisp = new MysteriousWisp(); WeakEntityCollection.Add("despise", wisp); wisp.MoveToWorld(new Point3D(1303, 1088, 0), Map.Trammel); foreach (Item item in eable) { if (item is Teleporter) { Teleporter old = (Teleporter)item; tele = new DespiseTeleporter(); WeakEntityCollection.Add("despise", tele); tele.PointDest = old.PointDest; tele.MapDest = old.MapDest; tele.MoveToWorld(old.Location, old.Map); old.Delete(); } } eable.Free(); e.Mobile.SendMessage("Despise setup complete"); } else { e.Mobile.SendMessage("Despise appears to already be setup"); } }
public static void SetupDespise_OnCommand(CommandEventArgs e) { if (DespiseController.Instance == null) { foreach (Region region in Region.Regions) { if (region.Name == "Despise" && region.Map == Map.Trammel) { foreach (Sector sector in region.Sectors) { List <Item> list = new List <Item>(sector.Items); foreach (Item item in list) { if (item is XmlSpawner) { ((XmlSpawner)item).DoReset = true; } } list.Clear(); } } } CommandEventArgs args = new CommandEventArgs(e.Mobile, null, null, new string[] { @"Data\Monsters\NewDespise" }); XmlSpawner.Load_OnCommand(args); DespiseController controller = new DespiseController(); controller.MoveToWorld(new Point3D(5571, 626, 30), Map.Trammel); DespiseAnkh ankh = new DespiseAnkh(Alignment.Good); ankh.MoveToWorld(new Point3D(5474, 525, 79), Map.Trammel); ankh = new DespiseAnkh(Alignment.Evil); ankh.MoveToWorld(new Point3D(5472, 754, 10), Map.Trammel); Moongate gate1 = new Moongate(false); Moongate gate2 = new Moongate(false); //Gate1 gate1.MoveToWorld(new Point3D(5475, 735, 5), Map.Trammel); gate2.MoveToWorld(new Point3D(5458, 610, 50), Map.Trammel); HueGates(gate1, gate2); LinkGates(gate1, gate2); gate1 = new Moongate(false); gate2 = new Moongate(false); //Gate2 gate1.MoveToWorld(new Point3D(5459, 674, 20), Map.Trammel); gate2.MoveToWorld(new Point3D(5454, 522, 60), Map.Trammel); HueGates(gate1, gate2); LinkGates(gate1, gate2); gate1 = new Moongate(false); gate2 = new Moongate(false); //Gate3 gate1.MoveToWorld(new Point3D(5388, 753, 5), Map.Trammel); gate2.MoveToWorld(new Point3D(5387, 628, 30), Map.Trammel); HueGates(gate1, gate2); LinkGates(gate1, gate2); //Teleporters IPooledEnumerable eable = Map.Trammel.GetItemsInRange(new Point3D(5588, 631, 30), 2); DespiseTeleporter tele = null; //Wisp MysteriousWisp wisp = new MysteriousWisp(); wisp.MoveToWorld(new Point3D(1303, 1088, 0), Map.Trammel); foreach (Item item in eable) { if (item is Teleporter) { Teleporter old = (Teleporter)item; tele = new DespiseTeleporter(); tele.PointDest = old.PointDest; tele.MapDest = old.MapDest; tele.MoveToWorld(old.Location, old.Map); old.Delete(); } } eable.Free(); e.Mobile.SendMessage("Despise Revamped setup! Don't forget to setup mob spawners an activate it!"); } else { e.Mobile.SendMessage("This has already been setup."); } }