public SGGumpActivatorRemoval(SGActivatorDevice m) : base(150, 50) { m_sgactivatordevice = m; this.Closable = true; this.Disposable = true; this.Dragable = true; this.Resizable = false; this.AddPage(0); this.AddBackground(0, 0, 398, 149, 9270); this.AddLabel(75, 15, 1153, @"Stargate Crystal Control Device Panel"); this.AddLabel(20, 40, 54, @"To remove this Crystal Control Device from the stargate"); this.AddLabel(20, 60, 54, @"system correctly please use the remove option."); this.AddLabel(60, 85, 69, @"Remove THIS Device"); this.AddLabel(60, 107, 33, @"Exit / Cancel"); this.AddButton(20, 83, 4002, 4004, 0, GumpButtonType.Reply, 0); // Remove this.AddButton(20, 105, 4020, 4022, 1, GumpButtonType.Reply, 0); // Exit / Cancel }
public SGGumpActivatorRemoval(SGActivatorDevice m) : base(150, 50) { m_sgactivatordevice = m; this.Closable = true; this.Disposable = true; this.Dragable = true; this.Resizable = false; this.AddPage(0); this.AddBackground(0, 0, 398, 149, 9270); this.AddLabel(75, 15, 1153, @"Gate Control Artifact Removal Panel"); this.AddLabel(20, 40, 54, @"To remove this Gate Artifact from the Gate"); this.AddLabel(20, 60, 54, @"system correctly please use the remove option."); this.AddLabel(60, 85, 69, @"Remove THIS artifact"); this.AddLabel(60, 107, 33, @"Exit / Cancel"); this.AddButton(20, 83, 4002, 4004, 0, GumpButtonType.Reply, 0); // Remove this.AddButton(20, 105, 4020, 4022, 1, GumpButtonType.Reply, 0); // Exit / Cancel }
public override void OnResponse(Server.Network.NetState sender, RelayInfo info) { Mobile from = sender.Mobile; bool CanBeUsed = SGCore.SGSystemEnabled; bool BeingUsed = false; bool Energy = false; bool HideAdd = SGCore.SGSystemHideGate; string DiscoverName = "NooneYet"; // Just a temp filler (Avoid a null string) // Get value contained in the text input box string sgplatname = GetString(info, 21); switch (info.ButtonID) { case 1: { from.CloseGump(typeof(SGGumpAdministrator)); sgaddonid = sgaddonid - 1; if (sgaddonid <= 1) { sgaddonid = 1; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 2: { from.CloseGump(typeof(SGGumpAdministrator)); sgaddonid = sgaddonid + 1; if (sgaddonid >= SGCore.SGAddonStyles) { sgaddonid = SGCore.SGAddonStyles; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 3: { from.CloseGump(typeof(SGGumpAdministrator)); if (sgdir == "East") { sgdir = "S"; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 4: { from.CloseGump(typeof(SGGumpAdministrator)); if (sgdir == "South") { sgdir = "E"; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 5: { from.CloseGump(typeof(SGGumpAdministrator)); addcode1 = addcode1 - 1; if (addcode1 <= 1) { addcode1 = 1; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 6: { from.CloseGump(typeof(SGGumpAdministrator)); addcode1 = addcode1 + 1; if (addcode1 >= 5) { addcode1 = 5; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 7: { from.CloseGump(typeof(SGGumpAdministrator)); addcode2 = addcode2 - 1; if (addcode2 <= 1) { addcode2 = 1; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 8: { from.CloseGump(typeof(SGGumpAdministrator)); addcode2 = addcode2 + 1; if (addcode2 >= 5) { addcode2 = 5; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 9: { from.CloseGump(typeof(SGGumpAdministrator)); addcode3 = addcode3 - 1; if (addcode3 <= 1) { addcode3 = 1; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 10: { from.CloseGump(typeof(SGGumpAdministrator)); addcode3 = addcode3 + 1; if (addcode3 >= 5) { addcode3 = 5; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 11: { from.CloseGump(typeof(SGGumpAdministrator)); addcode4 = addcode4 - 1; if (addcode4 <= 1) { addcode4 = 1; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 12: { from.CloseGump(typeof(SGGumpAdministrator)); addcode4 = addcode4 + 1; if (addcode4 >= 5) { addcode4 = 5; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 13: { from.CloseGump(typeof(SGGumpAdministrator)); addcode5 = addcode5 - 1; if (addcode5 <= 1) { addcode5 = 1; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 14: { from.CloseGump(typeof(SGGumpAdministrator)); addcode5 = addcode5 + 1; if (addcode5 >= 5) { addcode5 = 5; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 15: { from.CloseGump(typeof(SGGumpAdministrator)); bool dupedgate = false; // Check which map the person adding a gate is actually on string whichmap = Convert.ToString(from.Map); if (whichmap == "Felucca") { facetid = 1; } if (whichmap == "Trammel") { facetid = 2; } if (whichmap == "Ilshenar") { facetid = 3; } if (whichmap == "Malas") { facetid = 4; } if (whichmap == "Tokuno") { facetid = 5; } // Check for duplicated addresses in the array for (int i = 0; i < SGCore.SGList.Count; i++) { SGEntry sge = (SGEntry)SGCore.SGList[i]; { if (sge.SGFacetCode == facetid && sge.SGAddressCode1 == addcode1 && sge.SGAddressCode2 == addcode2 && sge.SGAddressCode3 == addcode3 && sge.SGAddressCode4 == addcode4 && sge.SGAddressCode5 == addcode5) { dupedgate = true; } } } if (!dupedgate) { if (sgdir == "South" && sgaddonid ==1) { sgdir = "S"; Item SGASouth = new SGLocationAddon1South(); SGASouth.MoveToWorld(new Point3D(from.X, from.Y, from.Z), from.Map); } if (sgdir == "East" && sgaddonid == 1) { sgdir = "E"; Item SGAEast = new SGLocationAddon1East(); SGAEast.MoveToWorld(new Point3D(from.X, from.Y, from.Z), from.Map); } if (sgdir == "South" && sgaddonid == 2) { sgdir = "S"; Item SGASouth = new SGLocationAddon2South(); SGASouth.MoveToWorld(new Point3D(from.X, from.Y, from.Z), from.Map); } if (sgdir == "East" && sgaddonid == 2) { sgdir = "E"; Item SGAEast = new SGLocationAddon2East(); SGAEast.MoveToWorld(new Point3D(from.X, from.Y, from.Z), from.Map); } if (sgdir == "South" && sgaddonid == 3) { sgdir = "S"; Item SGASouth = new SGLocationAddon3South(); SGASouth.MoveToWorld(new Point3D(from.X, from.Y, from.Z), from.Map); } if (sgdir == "East" && sgaddonid == 3) { sgdir = "E"; Item SGAEast = new SGLocationAddon3East(); SGAEast.MoveToWorld(new Point3D(from.X, from.Y, from.Z), from.Map); } Item SGACrystal = new SGActivatorDevice(from.X, from.Y, from.Z, sgdir, sgaddonid, CanBeUsed, BeingUsed, Energy, HideAdd, DiscoverName, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5); SGACrystal.MoveToWorld(new Point3D(from.X + 1, from.Y + 4, from.Z +1), from.Map); SGCore.SGList.Add(new SGEntry(from.X, from.Y, from.Z, sgdir, sgaddonid, SGCore.SGSystemEnabled, false, false, SGCore.SGSystemHideGate, "Nobody", sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); from.Z = from.Z + 6; from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); if (!SGCore.SGSystemEnabled) { for (int i = 0; i < SGCore.SGList.Count; i++) { SGEntry sge = (SGEntry)SGCore.SGList[i]; { sge.SGCanBeUsed = false; sge.SGBeingUsed = false; sge.SGEnergy = false; } } // Hue Control Crystals To DISABLED ArrayList SGADevice = new ArrayList(); foreach (Item item in World.Items.Values) { if (item is SGActivatorDevice) SGADevice.Add(item); } foreach (Item item in SGADevice) (item).Hue = 0; } else if (SGCore.SGSystemEnabled) { for (int i = 0; i < SGCore.SGList.Count; i++) { SGEntry sge = (SGEntry)SGCore.SGList[i]; { sge.SGCanBeUsed = true; sge.SGBeingUsed = false; sge.SGEnergy = false; } } // Hue Control Crystals To ENABLED ArrayList SGADevice = new ArrayList(); foreach (Item item in World.Items.Values) { if (item is SGActivatorDevice) SGADevice.Add(item); } foreach (Item item in SGADevice) (item).Hue = 0; } } else { // duped gate address from.SendMessage(88, "ABORTED !!!, This gate address is already used on this facet, Try a different address for your gate."); from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } } break; case 16: { from.CloseGump(typeof(SGGumpAdministrator)); if (!SGCore.SGSystemEnabled) { SGCore.SGSystemEnabled = true; from.SendMessage(77, "Gate System enabled."); for (int i = 0; i < SGCore.SGList.Count; i++) { SGEntry sge = (SGEntry)SGCore.SGList[i]; { sge.SGCanBeUsed = true; sge.SGBeingUsed = false; sge.SGEnergy = false; } } // Hue Control Crystals To NORMAL ArrayList SGADevice = new ArrayList(); foreach (Item item in World.Items.Values) { if (item is SGActivatorDevice) SGADevice.Add(item); } foreach (Item item in SGADevice) (item).Hue = 0; } else { SGCore.SGSystemEnabled = false; from.SendMessage(77, "Gate System disabled, any open gates will close down after they are used."); for (int i = 0; i < SGCore.SGList.Count; i++) { SGEntry sge = (SGEntry)SGCore.SGList[i]; { sge.SGCanBeUsed = false; sge.SGBeingUsed = false; sge.SGEnergy = false; } } // Hue Control Crystals To DISABLED ArrayList SGADevice = new ArrayList(); foreach (Item item in World.Items.Values) { if (item is SGActivatorDevice) SGADevice.Add(item); } foreach (Item item in SGADevice) (item).Hue = 0; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 17: { from.CloseGump(typeof(SGGumpAdministrator)); from.SendMessage(77, "Saving XML File, Overwriting old XML file..."); SGCore.SGTriggerSave(); from.SendMessage(77, "Save Done."); from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 18: { from.CloseGump(typeof(SGGumpAdministrator)); SGCore.SGTriggerLoad(); from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 19: { from.SendMessage(77, "Exit Gate Admin"); from.CloseGump(typeof(SGGumpAdministrator)); } break; case 20: { from.SendMessage(77, "Administrator Help & Information Option Selected..."); from.CloseGump(typeof(SGGumpAdministrator)); from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 21: { from.CloseGump(typeof(SGGumpAdministrator)); from.SendMessage(77, "Generate HTML Address File..."); SGCore.SGGenHTML(); from.SendMessage(77, "Done."); from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; } }
public SGActivatorDeviceTimer(SGActivatorDevice m) : base(TimeSpan.FromSeconds(SGCore.SGSystemBlink), TimeSpan.FromSeconds(SGCore.SGSystemBlink)) { m_sgactivatordevice = m; }
public static void SGWorldBuild() { if (SGList.Count <= 0) { Utility.PushColor(ConsoleColor.White); Console.Write("Gate System : "); Utility.PopColor(); Utility.PushColor(ConsoleColor.Green); Console.WriteLine("No Gates To Build."); Utility.PopColor(); } else { Utility.PushColor(ConsoleColor.White); Console.Write("Gate System : "); Utility.PopColor(); Utility.PushColor(ConsoleColor.Green); Console.WriteLine("Building {0} Gates...", SGList.Count); Utility.PopColor(); for (int i = 0; i < SGList.Count; i++) { SGEntry sgwb = (SGEntry)SGList[i]; // ******************************************** // *** Check Style And Direction of Platform ** // ******************************************** if (sgwb.SGStyle == 1) { if (sgwb.SGFacing == "E") { if (sgwb.SGFacetCode == 1) { Item platform = new SGLocationAddon1East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Felucca); } else if (sgwb.SGFacetCode == 2) { Item platform = new SGLocationAddon1East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Trammel); } else if (sgwb.SGFacetCode == 3) { Item platform = new SGLocationAddon1East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Ilshenar); } else if (sgwb.SGFacetCode == 4) { Item platform = new SGLocationAddon1East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Malas); } else if (sgwb.SGFacetCode == 5) { Item platform = new SGLocationAddon1East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Tokuno); } } else { if (sgwb.SGFacetCode == 1) { Item platform = new SGLocationAddon1South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Felucca); } else if (sgwb.SGFacetCode == 2) { Item platform = new SGLocationAddon1South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Trammel); } else if (sgwb.SGFacetCode == 3) { Item platform = new SGLocationAddon1South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Ilshenar); } else if (sgwb.SGFacetCode == 4) { Item platform = new SGLocationAddon1South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Malas); } else if (sgwb.SGFacetCode == 5) { Item platform = new SGLocationAddon1South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Tokuno); } } } if (sgwb.SGStyle == 2) { if (sgwb.SGFacing == "E") { if (sgwb.SGFacetCode == 1) { Item platform = new SGLocationAddon2East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Felucca); } else if (sgwb.SGFacetCode == 2) { Item platform = new SGLocationAddon2East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Trammel); } else if (sgwb.SGFacetCode == 3) { Item platform = new SGLocationAddon2East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Ilshenar); } else if (sgwb.SGFacetCode == 4) { Item platform = new SGLocationAddon2East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Malas); } else if (sgwb.SGFacetCode == 5) { Item platform = new SGLocationAddon2East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Tokuno); } } else { if (sgwb.SGFacetCode == 1) { Item platform = new SGLocationAddon2South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Felucca); } else if (sgwb.SGFacetCode == 2) { Item platform = new SGLocationAddon2South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Trammel); } else if (sgwb.SGFacetCode == 3) { Item platform = new SGLocationAddon2South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Ilshenar); } else if (sgwb.SGFacetCode == 4) { Item platform = new SGLocationAddon2South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Malas); } else if (sgwb.SGFacetCode == 5) { Item platform = new SGLocationAddon2South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Tokuno); } } } if (sgwb.SGStyle == 3) { if (sgwb.SGFacing == "E") { if (sgwb.SGFacetCode == 1) { Item platform = new SGLocationAddon3East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Felucca); } else if (sgwb.SGFacetCode == 2) { Item platform = new SGLocationAddon3East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Trammel); } else if (sgwb.SGFacetCode == 3) { Item platform = new SGLocationAddon3East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Ilshenar); } else if (sgwb.SGFacetCode == 4) { Item platform = new SGLocationAddon3East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Malas); } else if (sgwb.SGFacetCode == 5) { Item platform = new SGLocationAddon3East(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Tokuno); } } else { if (sgwb.SGFacetCode == 1) { Item platform = new SGLocationAddon3South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Felucca); } else if (sgwb.SGFacetCode == 2) { Item platform = new SGLocationAddon3South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Trammel); } else if (sgwb.SGFacetCode == 3) { Item platform = new SGLocationAddon3South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Ilshenar); } else if (sgwb.SGFacetCode == 4) { Item platform = new SGLocationAddon3South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Malas); } else if (sgwb.SGFacetCode == 5) { Item platform = new SGLocationAddon3South(); platform.MoveToWorld(new Point3D(sgwb.SGX, sgwb.SGY, sgwb.SGZ), Map.Tokuno); } } } // ******************************************** // * Add Crystal Control Device For This Gate * // ******************************************** if (sgwb.SGFacetCode == 1) { Item SGACrystal = new SGActivatorDevice(sgwb.SGX, sgwb.SGY, sgwb.SGZ, sgwb.SGFacing, sgwb.SGStyle, sgwb.SGCanBeUsed, sgwb.SGBeingUsed, sgwb.SGEnergy, sgwb.SGHidden, sgwb.SGDiscovered, sgwb.SGLocationName, sgwb.SGFacetCode, sgwb.SGAddressCode1, sgwb.SGAddressCode2, sgwb.SGAddressCode3, sgwb.SGAddressCode4, sgwb.SGAddressCode5); SGACrystal.MoveToWorld(new Point3D(sgwb.SGX + 1, sgwb.SGY + 4, sgwb.SGZ + 1), Map.Felucca); } else if (sgwb.SGFacetCode == 2) { Item SGACrystal = new SGActivatorDevice(sgwb.SGX, sgwb.SGY, sgwb.SGZ, sgwb.SGFacing, sgwb.SGStyle, sgwb.SGCanBeUsed, sgwb.SGBeingUsed, sgwb.SGEnergy, sgwb.SGHidden, sgwb.SGDiscovered, sgwb.SGLocationName, sgwb.SGFacetCode, sgwb.SGAddressCode1, sgwb.SGAddressCode2, sgwb.SGAddressCode3, sgwb.SGAddressCode4, sgwb.SGAddressCode5); SGACrystal.MoveToWorld(new Point3D(sgwb.SGX + 0, sgwb.SGY + 4, sgwb.SGZ), Map.Trammel); } else if (sgwb.SGFacetCode == 3) { Item SGACrystal = new SGActivatorDevice(sgwb.SGX, sgwb.SGY, sgwb.SGZ, sgwb.SGFacing, sgwb.SGStyle, sgwb.SGCanBeUsed, sgwb.SGBeingUsed, sgwb.SGEnergy, sgwb.SGHidden, sgwb.SGDiscovered, sgwb.SGLocationName, sgwb.SGFacetCode, sgwb.SGAddressCode1, sgwb.SGAddressCode2, sgwb.SGAddressCode3, sgwb.SGAddressCode4, sgwb.SGAddressCode5); SGACrystal.MoveToWorld(new Point3D(sgwb.SGX + 0, sgwb.SGY + 4, sgwb.SGZ), Map.Ilshenar); } else if (sgwb.SGFacetCode == 4) { Item SGACrystal = new SGActivatorDevice(sgwb.SGX, sgwb.SGY, sgwb.SGZ, sgwb.SGFacing, sgwb.SGStyle, sgwb.SGCanBeUsed, sgwb.SGBeingUsed, sgwb.SGEnergy, sgwb.SGHidden, sgwb.SGDiscovered, sgwb.SGLocationName, sgwb.SGFacetCode, sgwb.SGAddressCode1, sgwb.SGAddressCode2, sgwb.SGAddressCode3, sgwb.SGAddressCode4, sgwb.SGAddressCode5); SGACrystal.MoveToWorld(new Point3D(sgwb.SGX + 0, sgwb.SGY + 4, sgwb.SGZ), Map.Malas); } else if (sgwb.SGFacetCode == 5) { Item SGACrystal = new SGActivatorDevice(sgwb.SGX, sgwb.SGY, sgwb.SGZ, sgwb.SGFacing, sgwb.SGStyle, sgwb.SGCanBeUsed, sgwb.SGBeingUsed, sgwb.SGEnergy, sgwb.SGHidden, sgwb.SGDiscovered, sgwb.SGLocationName, sgwb.SGFacetCode, sgwb.SGAddressCode1, sgwb.SGAddressCode2, sgwb.SGAddressCode3, sgwb.SGAddressCode4, sgwb.SGAddressCode5); SGACrystal.MoveToWorld(new Point3D(sgwb.SGX + 0, sgwb.SGY + 4, sgwb.SGZ), Map.Tokuno); } } // Put correct HUE to Crystals built, System Enabled or Disabled if (!SGCore.SGSystemEnabled) { // System is Disabled for (int i = 0; i < SGCore.SGList.Count; i++) { SGEntry sge = (SGEntry)SGCore.SGList[i]; { sge.SGCanBeUsed = false; sge.SGBeingUsed = false; sge.SGEnergy = false; } } // Hue Control Crystals To DISABLED ArrayList SGADevice = new ArrayList(); foreach (Item item in World.Items.Values) { if (item is SGActivatorDevice) SGADevice.Add(item); } foreach (Item item in SGADevice) (item).Hue = 0; } else if (SGCore.SGSystemEnabled) { // System is Enabled for (int i = 0; i < SGCore.SGList.Count; i++) { SGEntry sge = (SGEntry)SGCore.SGList[i]; { sge.SGCanBeUsed = true; sge.SGBeingUsed = false; sge.SGEnergy = false; } } // Hue Control Crystals To NORMAL ArrayList SGADevice = new ArrayList(); foreach (Item item in World.Items.Values) { if (item is SGActivatorDevice) SGADevice.Add(item); } foreach (Item item in SGADevice) (item).Hue = 0; } } }
public SGGumpActivatorDevice(Mobile from, SGActivatorDevice m, int sgCURRENTsc, int sgCURRENTfacet, int sgCURRENTadd1, int sgCURRENTadd2, int sgCURRENTadd3, int sgCURRENTadd4, int sgCURRENTadd5) : base(100, 100) { m_sgactivatordevice = m; int SGSYB1 = 3676; int SGSYB2 = 3679; int SGSYB3 = 3682; int SGSYB4 = 3685; int SGSYB5 = 3688; this.Closable = false; this.Disposable = false; this.Dragable = true; this.Resizable = false; this.AddPage(0); AddImage(350, 319, 2521); AddImage(190, 65, 2220); AddImage(219, 358, 2523); AddImage(257, 357, 2524); AddImage(521, 357, 2525); AddImage(354, 357, 2524); AddImage(519, 319, 2522); AddImage(246, 319, 2521); AddImage(219, 320, 2520); AddImage(219, 467, 2526); AddImage(257, 468, 2527); AddImage(522, 469, 2528); AddImage(353, 469, 2527); // THIS GATE ADDRESS //this.AddItem(255, 105, //m.SGAFacetNumber * 3 - 3 + SGSYB1, 1360); this.AddItem(290, 105, m.SGAAddressCode1 * 3 - 3 + SGSYB1, 2713); this.AddItem(255, 155, m.SGAAddressCode2 * 3 - 3 + SGSYB1, 2713); this.AddItem(255, 205, m.SGAAddressCode3 * 3 - 3 + SGSYB1, 2713); this.AddItem(315, 155, m.SGAAddressCode4 * 3 - 3 + SGSYB1, 2713); this.AddItem(315, 205, m.SGAAddressCode5 * 3 - 3 + SGSYB1, 2713); // Dial Code Selection Icons // Facet option, starts with the facet the player is currently on //if (sgCURRENTfacet == 1) // { // this.AddItem(260, 380, sgCURRENTfacet * 3 - 3 + SGSYB1, 1360); //this.AddLabel(305, 40, 35, @"Felucca"); //} //else if (sgCURRENTfacet == 2) // { // this.AddItem(260, 380, sgCURRENTfacet * 3 - 3 + SGSYB1, 1360); //this.AddLabel(305, 40, 70, @"Trammel"); // } //else if (sgCURRENTfacet == 3) // { // this.AddItem(260, 380, sgCURRENTfacet * 3 - 3 + SGSYB1, 1360); //this.AddLabel(305, 40, 55, @"Ilshenar"); // } // else if (sgCURRENTfacet == 4) // { // this.AddItem(260, 380, sgCURRENTfacet * 3 - 3 + SGSYB1, 1360); //this.AddLabel(305, 40, 1265, @"Malas"); // } // else if (sgCURRENTfacet == 5) // { // this.AddItem(260, 380, sgCURRENTfacet * 3 - 3 + SGSYB1, 1360); //this.AddLabel(305, 40, 1152, @"Tokuno"); // } this.AddItem(266, 360, SGSYB1, 2713); this.AddItem(316, 360, SGSYB2, 2713); this.AddItem(366, 360, SGSYB3, 2713); // this this.AddItem(416, 360, SGSYB4, 2713); // this this.AddItem(466, 360, SGSYB5, 2713); // Gate Selected By User //this.AddItem(417, 105, sgCURRENTfacet * 3 - 3 + SGSYB1, 1360); if (sgCURRENTsc == 1) { this.AddItem(452, 105, sgCURRENTadd1 * 3 - 3 + SGSYB1, 1153); this.AddItem(417, 155, sgCURRENTadd2 * 3 - 3 + SGSYB1, 2946); this.AddItem(417, 205, sgCURRENTadd3 * 3 - 3 + SGSYB1, 2946); this.AddItem(477, 155, sgCURRENTadd4 * 3 - 3 + SGSYB1, 2946); this.AddItem(477, 205, sgCURRENTadd5 * 3 - 3 + SGSYB1, 2946); } else if (sgCURRENTsc == 2) { this.AddItem(452, 105, sgCURRENTadd1 * 3 - 3 + SGSYB1, 33); this.AddItem(417, 155, sgCURRENTadd2 * 3 - 3 + SGSYB1, 1153); this.AddItem(417, 205, sgCURRENTadd3 * 3 - 3 + SGSYB1, 2946); this.AddItem(477, 155, sgCURRENTadd4 * 3 - 3 + SGSYB1, 2946); this.AddItem(477, 205, sgCURRENTadd5 * 3 - 3 + SGSYB1, 2946); } else if (sgCURRENTsc == 3) { this.AddItem(452, 105, sgCURRENTadd1 * 3 - 3 + SGSYB1, 33); this.AddItem(417, 155, sgCURRENTadd2 * 3 - 3 + SGSYB1, 33); this.AddItem(417, 205, sgCURRENTadd3 * 3 - 3 + SGSYB1, 1153); this.AddItem(477, 155, sgCURRENTadd4 * 3 - 3 + SGSYB1, 2946); this.AddItem(477, 205, sgCURRENTadd5 * 3 - 3 + SGSYB1, 2946); } else if (sgCURRENTsc == 4) { this.AddItem(452, 105, sgCURRENTadd1 * 3 - 3 + SGSYB1, 33); this.AddItem(417, 155, sgCURRENTadd2 * 3 - 3 + SGSYB1, 33); this.AddItem(417, 205, sgCURRENTadd3 * 3 - 3 + SGSYB1, 33); this.AddItem(477, 155, sgCURRENTadd4 * 3 - 3 + SGSYB1, 1153); this.AddItem(477, 205, sgCURRENTadd5 * 3 - 3 + SGSYB1, 2946); } else if (sgCURRENTsc == 5) { this.AddItem(452, 105, sgCURRENTadd1 * 3 - 3 + SGSYB1, 33); this.AddItem(417, 155, sgCURRENTadd2 * 3 - 3 + SGSYB1, 33); this.AddItem(417, 205, sgCURRENTadd3 * 3 - 3 + SGSYB1, 33); this.AddItem(477, 155, sgCURRENTadd4 * 3 - 3 + SGSYB1, 33); this.AddItem(477, 205, sgCURRENTadd5 * 3 - 3 + SGSYB1, 1153); } else if (sgCURRENTsc >= 6) { this.AddItem(452, 105, sgCURRENTadd1 * 3 - 3 + SGSYB1, 33); this.AddItem(417, 155, sgCURRENTadd2 * 3 - 3 + SGSYB1, 33); this.AddItem(417, 205, sgCURRENTadd3 * 3 - 3 + SGSYB1, 33); this.AddItem(477, 155, sgCURRENTadd4 * 3 - 3 + SGSYB1, 33); this.AddItem(477, 205, sgCURRENTadd5 * 3 - 3 + SGSYB1, 33); } else { this.AddItem(452, 105, sgCURRENTadd1 * 3 - 3 + SGSYB1, 2946); this.AddItem(417, 155, sgCURRENTadd2 * 3 - 3 + SGSYB1, 2946); this.AddItem(417, 205, sgCURRENTadd3 * 3 - 3 + SGSYB1, 2946); this.AddItem(477, 155, sgCURRENTadd4 * 3 - 3 + SGSYB1, 2946); this.AddItem(477, 205, sgCURRENTadd5 * 3 - 3 + SGSYB1, 2946); } sgTOselectioncounter = sgCURRENTsc; sgTOfacetid = sgCURRENTfacet; sgTOaddress1 = sgCURRENTadd1; sgTOaddress2 = sgCURRENTadd2; sgTOaddress3 = sgCURRENTadd3; sgTOaddress4 = sgCURRENTadd4; sgTOaddress5 = sgCURRENTadd5; // Labels on the gate AddLabel(287, 432, 0, @"Scribe"); AddLabel(460, 432, 0, @"End"); AddLabel(373, 432, 0, @"Erase"); this.AddButton(272, 400, 1154, 1155, 2, GumpButtonType.Reply, 0); // Selection 1 this.AddButton(322, 400, 1154, 1155, 3, GumpButtonType.Reply, 0); // Selection 2 this.AddButton(372, 400, 1154, 1155, 4, GumpButtonType.Reply, 0); // Selection 3 this.AddButton(422, 400, 1154, 1155, 5, GumpButtonType.Reply, 0); // Selection 4 this.AddButton(472, 400, 1154, 1155, 6, GumpButtonType.Reply, 0); // Selection 5 this.AddButton(273, 450, 247, 248, 7, GumpButtonType.Reply, 0); // ACTIVATE this.AddButton(357, 450, 238, 240, 8, GumpButtonType.Reply, 0); // RESET this.AddButton(438, 450, 242, 241, 9, GumpButtonType.Reply, 0); // CANCEL // Administrator & GM Functions if (from.AccessLevel >= AccessLevel.GameMaster) { this.AddLabel(370, 328, 0, @"Overseer Functions"); this.AddButton(299, 327, 247, 248, 11, GumpButtonType.Reply, 0); } }
public override void OnResponse(Server.Network.NetState sender, RelayInfo info) { Mobile from = sender.Mobile; bool CanBeUsed = SGCore.SGSystemEnabled; bool BeingUsed = false; bool Energy = false; bool HideAdd = SGCore.SGSystemHideGate; string DiscoverName = "NooneYet"; // Just a temp filler (Avoid a null string) // Get value contained in the text input box string sgplatname = GetString(info, 21); switch (info.ButtonID) { case 1: { from.CloseGump(typeof(SGGumpAdministrator)); sgaddonid = sgaddonid - 1; if (sgaddonid <= 1) { sgaddonid = 1; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 2: { from.CloseGump(typeof(SGGumpAdministrator)); sgaddonid = sgaddonid + 1; if (sgaddonid >= SGCore.SGAddonStyles) { sgaddonid = SGCore.SGAddonStyles; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 3: { from.CloseGump(typeof(SGGumpAdministrator)); if (sgdir == "East") { sgdir = "S"; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 4: { from.CloseGump(typeof(SGGumpAdministrator)); if (sgdir == "South") { sgdir = "E"; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 5: { from.CloseGump(typeof(SGGumpAdministrator)); addcode1 = addcode1 - 1; if (addcode1 <= 1) { addcode1 = 1; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 6: { from.CloseGump(typeof(SGGumpAdministrator)); addcode1 = addcode1 + 1; if (addcode1 >= 5) { addcode1 = 5; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 7: { from.CloseGump(typeof(SGGumpAdministrator)); addcode2 = addcode2 - 1; if (addcode2 <= 1) { addcode2 = 1; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 8: { from.CloseGump(typeof(SGGumpAdministrator)); addcode2 = addcode2 + 1; if (addcode2 >= 5) { addcode2 = 5; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 9: { from.CloseGump(typeof(SGGumpAdministrator)); addcode3 = addcode3 - 1; if (addcode3 <= 1) { addcode3 = 1; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 10: { from.CloseGump(typeof(SGGumpAdministrator)); addcode3 = addcode3 + 1; if (addcode3 >= 5) { addcode3 = 5; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 11: { from.CloseGump(typeof(SGGumpAdministrator)); addcode4 = addcode4 - 1; if (addcode4 <= 1) { addcode4 = 1; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 12: { from.CloseGump(typeof(SGGumpAdministrator)); addcode4 = addcode4 + 1; if (addcode4 >= 5) { addcode4 = 5; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 13: { from.CloseGump(typeof(SGGumpAdministrator)); addcode5 = addcode5 - 1; if (addcode5 <= 1) { addcode5 = 1; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 14: { from.CloseGump(typeof(SGGumpAdministrator)); addcode5 = addcode5 + 1; if (addcode5 >= 5) { addcode5 = 5; } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 15: { from.CloseGump(typeof(SGGumpAdministrator)); bool dupedgate = false; // Check which map the person adding a gate is actually on string whichmap = Convert.ToString(from.Map); if (whichmap == "Felucca") { facetid = 1; } if (whichmap == "Trammel") { facetid = 2; } if (whichmap == "Ilshenar") { facetid = 3; } if (whichmap == "Malas") { facetid = 4; } if (whichmap == "Tokuno") { facetid = 5; } // Check for duplicated addresses in the array for (int i = 0; i < SGCore.SGList.Count; i++) { SGEntry sge = (SGEntry)SGCore.SGList[i]; { if (sge.SGFacetCode == facetid && sge.SGAddressCode1 == addcode1 && sge.SGAddressCode2 == addcode2 && sge.SGAddressCode3 == addcode3 && sge.SGAddressCode4 == addcode4 && sge.SGAddressCode5 == addcode5) { dupedgate = true; } } } if (!dupedgate) { if (sgdir == "South" && sgaddonid == 1) { sgdir = "S"; Item SGASouth = new SGLocationAddon1South(); SGASouth.MoveToWorld(new Point3D(from.X, from.Y, from.Z), from.Map); } if (sgdir == "East" && sgaddonid == 1) { sgdir = "E"; Item SGAEast = new SGLocationAddon1East(); SGAEast.MoveToWorld(new Point3D(from.X, from.Y, from.Z), from.Map); } if (sgdir == "South" && sgaddonid == 2) { sgdir = "S"; Item SGASouth = new SGLocationAddon2South(); SGASouth.MoveToWorld(new Point3D(from.X, from.Y, from.Z), from.Map); } if (sgdir == "East" && sgaddonid == 2) { sgdir = "E"; Item SGAEast = new SGLocationAddon2East(); SGAEast.MoveToWorld(new Point3D(from.X, from.Y, from.Z), from.Map); } if (sgdir == "South" && sgaddonid == 3) { sgdir = "S"; Item SGASouth = new SGLocationAddon3South(); SGASouth.MoveToWorld(new Point3D(from.X, from.Y, from.Z), from.Map); } if (sgdir == "East" && sgaddonid == 3) { sgdir = "E"; Item SGAEast = new SGLocationAddon3East(); SGAEast.MoveToWorld(new Point3D(from.X, from.Y, from.Z), from.Map); } Item SGACrystal = new SGActivatorDevice(from.X, from.Y, from.Z, sgdir, sgaddonid, CanBeUsed, BeingUsed, Energy, HideAdd, DiscoverName, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5); SGACrystal.MoveToWorld(new Point3D(from.X + 2, from.Y - 2, from.Z), from.Map); // Add facet symbol to world for this stargate control crystal if (facetid == 1) { Item sgFIDsym = new SGFacetSymbol1(); sgFIDsym.MoveToWorld(new Point3D(from.Location.X + 1, from.Location.Y - 2, from.Location.Z), from.Map); } if (facetid == 2) { Item sgFIDsym = new SGFacetSymbol2(); sgFIDsym.MoveToWorld(new Point3D(from.Location.X + 1, from.Location.Y - 2, from.Location.Z), from.Map); } if (facetid == 3) { Item sgFIDsym = new SGFacetSymbol3(); sgFIDsym.MoveToWorld(new Point3D(from.Location.X + 1, from.Location.Y - 2, from.Location.Z), from.Map); } if (facetid == 4) { Item sgFIDsym = new SGFacetSymbol4(); sgFIDsym.MoveToWorld(new Point3D(from.Location.X + 1, from.Location.Y - 2, from.Location.Z), from.Map); } if (facetid == 5) { Item sgFIDsym = new SGFacetSymbol5(); sgFIDsym.MoveToWorld(new Point3D(from.Location.X + 1, from.Location.Y - 2, from.Location.Z), from.Map); } // Add 1st CODE symbol to the world if (addcode1 == 1) { Item sgAC1sym = new SGAddressSymbol1(); sgAC1sym.MoveToWorld(new Point3D(from.Location.X - 2, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode1 == 2) { Item sgAC1sym = new SGAddressSymbol2(); sgAC1sym.MoveToWorld(new Point3D(from.Location.X - 2, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode1 == 3) { Item sgAC1sym = new SGAddressSymbol3(); sgAC1sym.MoveToWorld(new Point3D(from.Location.X - 2, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode1 == 4) { Item sgAC1sym = new SGAddressSymbol4(); sgAC1sym.MoveToWorld(new Point3D(from.Location.X - 2, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode1 == 5) { Item sgAC1sym = new SGAddressSymbol5(); sgAC1sym.MoveToWorld(new Point3D(from.Location.X - 2, from.Location.Y + 2, from.Location.Z), from.Map); } // Add 2nd CODE symbol to the world if (addcode2 == 1) { Item sgAC2sym = new SGAddressSymbol1(); sgAC2sym.MoveToWorld(new Point3D(from.Location.X - 1, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode2 == 2) { Item sgAC2sym = new SGAddressSymbol2(); sgAC2sym.MoveToWorld(new Point3D(from.Location.X - 1, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode2 == 3) { Item sgAC2sym = new SGAddressSymbol3(); sgAC2sym.MoveToWorld(new Point3D(from.Location.X - 1, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode2 == 4) { Item sgAC2sym = new SGAddressSymbol4(); sgAC2sym.MoveToWorld(new Point3D(from.Location.X - 1, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode2 == 5) { Item sgAC2sym = new SGAddressSymbol5(); sgAC2sym.MoveToWorld(new Point3D(from.Location.X - 1, from.Location.Y + 2, from.Location.Z), from.Map); } // Add 3rd CODE symbol to the world if (addcode3 == 1) { Item sgAC3sym = new SGAddressSymbol1(); sgAC3sym.MoveToWorld(new Point3D(from.Location.X, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode3 == 2) { Item sgAC3sym = new SGAddressSymbol2(); sgAC3sym.MoveToWorld(new Point3D(from.Location.X, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode3 == 3) { Item sgAC3sym = new SGAddressSymbol3(); sgAC3sym.MoveToWorld(new Point3D(from.Location.X, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode3 == 4) { Item sgAC3sym = new SGAddressSymbol4(); sgAC3sym.MoveToWorld(new Point3D(from.Location.X, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode3 == 5) { Item sgAC3sym = new SGAddressSymbol5(); sgAC3sym.MoveToWorld(new Point3D(from.Location.X, from.Location.Y + 2, from.Location.Z), from.Map); } // Add 4th CODE symbol to the world if (addcode4 == 1) { Item sgAC4sym = new SGAddressSymbol1(); sgAC4sym.MoveToWorld(new Point3D(from.Location.X + 1, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode4 == 2) { Item sgAC4sym = new SGAddressSymbol2(); sgAC4sym.MoveToWorld(new Point3D(from.Location.X + 1, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode4 == 3) { Item sgAC4sym = new SGAddressSymbol3(); sgAC4sym.MoveToWorld(new Point3D(from.Location.X + 1, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode4 == 4) { Item sgAC4sym = new SGAddressSymbol4(); sgAC4sym.MoveToWorld(new Point3D(from.Location.X + 1, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode4 == 5) { Item sgAC4sym = new SGAddressSymbol5(); sgAC4sym.MoveToWorld(new Point3D(from.Location.X + 1, from.Location.Y + 2, from.Location.Z), from.Map); } // Add 5th CODE symbol to the world if (addcode5 == 1) { Item sgAC5sym = new SGAddressSymbol1(); sgAC5sym.MoveToWorld(new Point3D(from.Location.X + 2, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode5 == 2) { Item sgAC5sym = new SGAddressSymbol2(); sgAC5sym.MoveToWorld(new Point3D(from.Location.X + 2, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode5 == 3) { Item sgAC5sym = new SGAddressSymbol3(); sgAC5sym.MoveToWorld(new Point3D(from.Location.X + 2, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode5 == 4) { Item sgAC5sym = new SGAddressSymbol4(); sgAC5sym.MoveToWorld(new Point3D(from.Location.X + 2, from.Location.Y + 2, from.Location.Z), from.Map); } if (addcode5 == 5) { Item sgAC5sym = new SGAddressSymbol5(); sgAC5sym.MoveToWorld(new Point3D(from.Location.X + 2, from.Location.Y + 2, from.Location.Z), from.Map); } SGCore.SGList.Add(new SGEntry(from.X, from.Y, from.Z, sgdir, sgaddonid, SGCore.SGSystemEnabled, false, false, SGCore.SGSystemHideGate, "Nobody", sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); from.Z = from.Z + 5; from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); if (!SGCore.SGSystemEnabled) { for (int i = 0; i < SGCore.SGList.Count; i++) { SGEntry sge = (SGEntry)SGCore.SGList[i]; { sge.SGCanBeUsed = false; sge.SGBeingUsed = false; sge.SGEnergy = false; } } // Hue Control Crystals To DISABLED ArrayList SGADevice = new ArrayList(); foreach (Item item in World.Items.Values) { if (item is SGActivatorDevice) { SGADevice.Add(item); } } foreach (Item item in SGADevice) { (item).Hue = 39; } } else if (SGCore.SGSystemEnabled) { for (int i = 0; i < SGCore.SGList.Count; i++) { SGEntry sge = (SGEntry)SGCore.SGList[i]; { sge.SGCanBeUsed = true; sge.SGBeingUsed = false; sge.SGEnergy = false; } } // Hue Control Crystals To ENABLED ArrayList SGADevice = new ArrayList(); foreach (Item item in World.Items.Values) { if (item is SGActivatorDevice) { SGADevice.Add(item); } } foreach (Item item in SGADevice) { (item).Hue = 2963; } } } else { // duped gate address from.SendMessage(88, "ABORTED !!!, This gate address is already used on this facet, Try a different address for your gate."); from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } } break; case 16: { from.CloseGump(typeof(SGGumpAdministrator)); if (!SGCore.SGSystemEnabled) { SGCore.SGSystemEnabled = true; from.SendMessage(77, "Stargate System enabled."); for (int i = 0; i < SGCore.SGList.Count; i++) { SGEntry sge = (SGEntry)SGCore.SGList[i]; { sge.SGCanBeUsed = true; sge.SGBeingUsed = false; sge.SGEnergy = false; } } // Hue Control Crystals To NORMAL ArrayList SGADevice = new ArrayList(); foreach (Item item in World.Items.Values) { if (item is SGActivatorDevice) { SGADevice.Add(item); } } foreach (Item item in SGADevice) { (item).Hue = 2963; } } else { SGCore.SGSystemEnabled = false; from.SendMessage(77, "Stargate System disabled, any open gates will close down after they are used."); for (int i = 0; i < SGCore.SGList.Count; i++) { SGEntry sge = (SGEntry)SGCore.SGList[i]; { sge.SGCanBeUsed = false; sge.SGBeingUsed = false; sge.SGEnergy = false; } } // Hue Control Crystals To DISABLED ArrayList SGADevice = new ArrayList(); foreach (Item item in World.Items.Values) { if (item is SGActivatorDevice) { SGADevice.Add(item); } } foreach (Item item in SGADevice) { (item).Hue = 39; } } from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 17: { from.CloseGump(typeof(SGGumpAdministrator)); from.SendMessage(77, "Saving XML File, Overwriting old XML file..."); SGCore.SGTriggerSave(); from.SendMessage(77, "Save Done."); from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 18: { from.CloseGump(typeof(SGGumpAdministrator)); SGCore.SGTriggerLoad(); from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 19: { from.SendMessage(77, "Exit Stargate Admin"); from.CloseGump(typeof(SGGumpAdministrator)); } break; case 20: { from.SendMessage(77, "Administrator Help & Information Option Selected..."); from.CloseGump(typeof(SGGumpAdministratorInfo)); from.SendGump(new SGGumpAdministratorInfo()); from.CloseGump(typeof(SGGumpAdministrator)); from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; case 21: { from.CloseGump(typeof(SGGumpAdministrator)); from.SendMessage(77, "Generate HTML Address File..."); SGCore.SGGenHTML(); from.SendMessage(77, "Done."); from.SendGump(new SGGumpAdministrator(from, sggatecounter, sgaddonid, sgdir, sgplatname, facetid, addcode1, addcode2, addcode3, addcode4, addcode5)); } break; } }