RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.0 SVN 199] Stargate Travel System v3.0

FingersMcSteal

Sorceror
It works by dialing then selecting Activate, the address you dial (via the symbols to the right of the gump) moves along by one each time, the white symbol in the selection destination is the symbol your picking.

Try this to begin with...

Make 3 gates with the following codes for each...

1st gate address... 1,1,1,1,1
2nd gate address... 1,1,1,1,2
3rd gate address... 1,1,1,1,3

Activate the crystal at gate 2 or 3 and just hit the activate button, you'll open a stargate to the 1st gate (because the gump defaults to 1,1,1,1,1).

Now try to go from gate 1 to gate 2, you need to dial...

1st symbol +
1st symbol +
1st symbol +
1st symbol +
2nd symbol + Activate button.

You can get to this gate from any other stargate because that 2nd gates address code was 1,1,1,1,2.

Theres a help button on the dialing gump which should give some instructions about how it works, hopefully this helps.
 

datguy

Sorceror
I changed the Buttons to press to the Number to make it a bit more obvious to players as I was getting tired of explaining it to them in SGGumpActivatorDevice
Code:
            this.AddButton(392, 130, 2225, 2225, 2, GumpButtonType.Reply, 0); // Selection 1
            this.AddButton(400, 185, 2226, 2226, 3, GumpButtonType.Reply, 0); // Selection 2
            this.AddButton(400, 254, 2227, 2227, 4, GumpButtonType.Reply, 0); // Selection 3
            this.AddButton(392, 313, 2228, 2228, 5, GumpButtonType.Reply, 0); // Selection 4
            this.AddButton(377, 381, 2229, 2229, 6, GumpButtonType.Reply, 0); // Selection 5
            this.AddButton(195, 385, 1147, 1149, 7, GumpButtonType.Reply, 0); // ACTIVATE

Also, Would it be possible to make a Gate with having the Activator device Hidden? This way it's a oneway gate(no DHD :) Currently if you hide it, it'll be there again at reboot
 

Manu

Knight
The way I use it all gates are OneWay. I just set it up so the teleporter on the target gate is spawned at z -120 ;) Quick and dirty, but I was too lazy to try to edit out the spawning of the target teleporter.

*edit* Oh, wait, that wasnt what you have in mind... nvmd...
 

scrapy

Wanderer
I love Films StarGate :D!!! The Good idea to do them in uo! FingersMcSteal Respect!:cool:

Can who nor be to translate for RC1? Such system it is necessary to present all )
 

FingersMcSteal

Sorceror
I'll wait for RC2 before i do an update, once thats out i'll add pretty much the things people have asked for here... I.E one way gates etc.
 

doaker

Wanderer
Stargate System v3

Ok I like the stargate im going to put it in soon as i can. But i have a issue with it. I can not see the crystal control device it in a unused item it still works and all but i would like to know where to change the Id of it to 14326 it is a folded up blade spirits i wanted to use something cool for it but i didnt want to leave the control device like it is. Can u help me with this so i can put this in so I and others can see something to use. lol hehe ty ...Doaker
 

Attachments

  • stargate.jpg
    stargate.jpg
    223.7 KB · Views: 83
  • stargate1.jpg
    stargate1.jpg
    210.8 KB · Views: 73

FingersMcSteal

Sorceror
Look in the SGActivatorDevice.cs and find this line just after the GET/SET region of code...

Code:
[Constructable]
public SGActivatorDevice(int sgaxloc, int sgayloc, int sgazloc, string sgafacing, int sgastyle, bool canbeused, bool beingused, bool energy, bool hidden, string discover, string locname, int facetID, int sgac1, int sgac2, int sgac3, int sgac4, int sgac5) : base(13803)
{

13803 at the end of that line is the itemID of the crystal, change to what itemID you require.

That should be it.
 

doaker

Wanderer
stargate

Ok can i get one more question where can i change the hues on the control device and i think that will sum it up thank u very good job...Doaker.

lol sorry im asking without looking i got it ty anyways ..Doaker.
 

jhs59

Sorceror
I LOVE this system. I was wondering if, in the next update, a feature can be added to the gates that would allow them to not be shown in the list unless a character has already accessed that gate.

For instance, as it is now, as long as someone somewhere has discovered a gate, it's code is displayed for all to see in the list.

I would like that if a character has never been to a gate, they will not see that gate's code in the list even if someone else has discovered that gate prior to them.

The reason for this is that I would like to place secret gates that won't be able to be found unless a player activates them by chance. Imagine the possibilities! :)
 

Greystar

Wanderer
jhs59;740810 said:
I LOVE this system. I was wondering if, in the next update, a feature can be added to the gates that would allow them to not be shown in the list unless a character has already accessed that gate.

For instance, as it is now, as long as someone somewhere has discovered a gate, it's code is displayed for all to see in the list.

I would like that if a character has never been to a gate, they will not see that gate's code in the list even if someone else has discovered that gate prior to them.

The reason for this is that I would like to place secret gates that won't be able to be found unless a player activates them by chance. Imagine the possibilities! :)

I like this possibility as well. I've actually considered removing my moongates and using this instead, but I'll have to wait and see if that's what I actually want to do. Since you can "Dial" a location it's the same as choosing a gate destination, except it's not run through and click. Only Negative to that is if you are trying to use a gate to flee from combat, which I don't think you can do anyway. I'll have to look and decide what I want to do.
 

FingersMcSteal

Sorceror
You should get something like this once it's installed...



But... your trying to install a system that was written for RunUO 2.0 not version 1.0

The old system i did is still here on the forums tho, maybe that can be used but it's a little different and required a script edit to add gates...

http://www.runuo.com/forums/custom-...runuo-1-0-version-stargate-travel-system.html

Best i can do for you.
 

nadious

Sorceror
EXCELLENT system. I too, would love to use this without installed gates being viewable for everyone to see. In fact, I want to use this for an upcoming quest, where the ONLY way to get to where you need to go to start the event, is through the Stargate.

How hard would it be to change the gump (I'm not very good at scripting...) so it would not show the locations of the gates that you have installed? I took a look and I'm assuming that I would change the following (marked in RED):

Code:
using System;
using System.Collections;

using Server;
using Server.Items;
using Server.Network;
using Server.Mobiles;
using Server.Gumps;

namespace Server.SG
{
    public class SGGumpActivatorDevice : Gump
    {
        private SGActivatorDevice m_sgactivatordevice;

        public int sgTOselectioncounter;
        public int reset = 1;

        public int sgTOfacetid;
        public int sgTOaddress1;
        public int sgTOaddress2;
        public int sgTOaddress3;
        public int sgTOaddress4;
        public int sgTOaddress5;

        public int sgDESTINATIONfacet;
        public int sgDESTINATIONaddress1;
        public int sgDESTINATIONaddress2;
        public int sgDESTINATIONaddress3;
        public int sgDESTINATIONaddress4;
        public int sgDESTINATIONaddress5;

        public int sgDESTINATIONlocX;
        public int sgDESTINATIONlocY;
        public int sgDESTINATIONlocZ;
        public string sgDESTINATIONfacing;

        public bool sgDESTINATIONbusyused;
        public bool sgDESTINATIONbusyenergy;

        public int sgOnThisFacet = 0;
        public int sgOnThisHidden = 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);
            this.AddImage(0, 0, 30500);

            // THIS GATE ADDRESS
            this.AddItem(20, 40, m.SGAFacetNumber * 3 - 3 + SGSYB1, 1360);

            this.AddItem(80, 40, m.SGAAddressCode1 * 3 - 3 + SGSYB1, 1372);
            this.AddItem(120, 40, m.SGAAddressCode2 * 3 - 3 + SGSYB1, 1372);
            this.AddItem(160, 40, m.SGAAddressCode3 * 3 - 3 + SGSYB1, 1372);
            this.AddItem(200, 40, m.SGAAddressCode4 * 3 - 3 + SGSYB1, 1372);
            this.AddItem(240, 40, m.SGAAddressCode5 * 3 - 3 + SGSYB1, 1372);

            // Dial Code Selection Icons
            // Facet option, starts with the facet the player is currently on
            if (sgCURRENTfacet == 1)
            {
                this.AddItem(365, 43, sgCURRENTfacet * 3 - 3 + SGSYB1, 1360);
                this.AddLabel(305, 40, 35, @"Felucca");
            }
            else if (sgCURRENTfacet == 2)
            {
                this.AddItem(365, 43, sgCURRENTfacet * 3 - 3 + SGSYB1, 1360);
                this.AddLabel(305, 40, 70, @"Trammel");
            }
            else if (sgCURRENTfacet == 3)
            {
                this.AddItem(365, 43, sgCURRENTfacet * 3 - 3 + SGSYB1, 1360);
                this.AddLabel(305, 40, 55, @"Ilshenar");
            }
            else if (sgCURRENTfacet == 4)
            {
                this.AddItem(365, 43, sgCURRENTfacet * 3 - 3 + SGSYB1, 1360);
                this.AddLabel(305, 40, 1265, @"Malas");
            }
            else if (sgCURRENTfacet == 5)
            {
                this.AddItem(365, 43, sgCURRENTfacet * 3 - 3 + SGSYB1, 1360);
                this.AddLabel(305, 40, 1152, @"Tokuno");
            }

            this.AddItem(387, 106, SGSYB1, 1195);
            this.AddItem(394, 161, SGSYB2, 1195);
            this.AddItem(392, 218, SGSYB3, 1195); // this
            this.AddItem(386, 288, SGSYB4, 1195); // this
            this.AddItem(371, 345, SGSYB5, 1195);

            // Gate Selected By User
            this.AddItem(30, 125, sgCURRENTfacet * 3 - 3 + SGSYB1, 1360);

            if (sgCURRENTsc == 1)
            {
                this.AddItem(90, 125, sgCURRENTadd1 * 3 - 3 + SGSYB1, 1153);
                this.AddItem(130, 125, sgCURRENTadd2 * 3 - 3 + SGSYB1, 33);
                this.AddItem(170, 125, sgCURRENTadd3 * 3 - 3 + SGSYB1, 33);
                this.AddItem(210, 125, sgCURRENTadd4 * 3 - 3 + SGSYB1, 33);
                this.AddItem(250, 125, sgCURRENTadd5 * 3 - 3 + SGSYB1, 33);
            }
            else if (sgCURRENTsc == 2)
            {
                this.AddItem(90, 125, sgCURRENTadd1 * 3 - 3 + SGSYB1, 1372);
                this.AddItem(130, 125, sgCURRENTadd2 * 3 - 3 + SGSYB1, 1153);
                this.AddItem(170, 125, sgCURRENTadd3 * 3 - 3 + SGSYB1, 33);
                this.AddItem(210, 125, sgCURRENTadd4 * 3 - 3 + SGSYB1, 33);
                this.AddItem(250, 125, sgCURRENTadd5 * 3 - 3 + SGSYB1, 33);
            }
            else if (sgCURRENTsc == 3)
            {
                this.AddItem(90, 125, sgCURRENTadd1 * 3 - 3 + SGSYB1, 1372);
                this.AddItem(130, 125, sgCURRENTadd2 * 3 - 3 + SGSYB1, 1372);
                this.AddItem(170, 125, sgCURRENTadd3 * 3 - 3 + SGSYB1, 1153);
                this.AddItem(210, 125, sgCURRENTadd4 * 3 - 3 + SGSYB1, 33);
                this.AddItem(250, 125, sgCURRENTadd5 * 3 - 3 + SGSYB1, 33);
            }
            else if (sgCURRENTsc == 4)
            {
                this.AddItem(90, 125, sgCURRENTadd1 * 3 - 3 + SGSYB1, 1372);
                this.AddItem(130, 125, sgCURRENTadd2 * 3 - 3 + SGSYB1, 1372);
                this.AddItem(170, 125, sgCURRENTadd3 * 3 - 3 + SGSYB1, 1372);
                this.AddItem(210, 125, sgCURRENTadd4 * 3 - 3 + SGSYB1, 1153);
                this.AddItem(250, 125, sgCURRENTadd5 * 3 - 3 + SGSYB1, 33);
            }
            else if (sgCURRENTsc == 5)
            {
                this.AddItem(90, 125, sgCURRENTadd1 * 3 - 3 + SGSYB1, 1372);
                this.AddItem(130, 125, sgCURRENTadd2 * 3 - 3 + SGSYB1, 1372);
                this.AddItem(170, 125, sgCURRENTadd3 * 3 - 3 + SGSYB1, 1372);
                this.AddItem(210, 125, sgCURRENTadd4 * 3 - 3 + SGSYB1, 1372);
                this.AddItem(250, 125, sgCURRENTadd5 * 3 - 3 + SGSYB1, 1153);
            }
            else if (sgCURRENTsc >= 6)
            {
                this.AddItem(90, 125, sgCURRENTadd1 * 3 - 3 + SGSYB1, 1372);
                this.AddItem(130, 125, sgCURRENTadd2 * 3 - 3 + SGSYB1, 1372);
                this.AddItem(170, 125, sgCURRENTadd3 * 3 - 3 + SGSYB1, 1372);
                this.AddItem(210, 125, sgCURRENTadd4 * 3 - 3 + SGSYB1, 1372);
                this.AddItem(250, 125, sgCURRENTadd5 * 3 - 3 + SGSYB1, 1372);
            }
            else
            {
                this.AddItem(90, 125, sgCURRENTadd1 * 3 - 3 + SGSYB1, 33);
                this.AddItem(130, 125, sgCURRENTadd2 * 3 - 3 + SGSYB1, 33);
                this.AddItem(170, 125, sgCURRENTadd3 * 3 - 3 + SGSYB1, 33);
                this.AddItem(210, 125, sgCURRENTadd4 * 3 - 3 + SGSYB1, 33);
                this.AddItem(250, 125, sgCURRENTadd5 * 3 - 3 + SGSYB1, 33);
            }

            sgTOselectioncounter = sgCURRENTsc;
            sgTOfacetid = sgCURRENTfacet;
            sgTOaddress1 = sgCURRENTadd1;
            sgTOaddress2 = sgCURRENTadd2;
            sgTOaddress3 = sgCURRENTadd3;
            sgTOaddress4 = sgCURRENTadd4;
            sgTOaddress5 = sgCURRENTadd5;
            

            // Labels on the gate
            this.AddLabel(15, 20, 1153, @"Stargate Address :");
            this.AddLabel(140, 20, 1160, m.SGALocationName);

            this.AddLabel(25, 75, 1153, @"Discovered By :");
            this.AddLabel(127, 75, 45, m.SGADiscovererName);

            this.AddLabel(305, 20, 90, @"Destination Facet");
            this.AddLabel(330, 85, 90, @"Symbol Selector");
            this.AddLabel(35, 104, 90, @"Destination Selection...");
            this.AddLabel(65, 373, 60, @"Activate");
            this.AddLabel(65, 395, 90, @"Reset");
            this.AddLabel(65, 417, 32, @"Cancel");

            this.AddLabel(60, 160, 64, @"Stargates On This Facet :");
            this.AddLabel(60, 180, 64, @"Hidden Locations :");

            this.AddImage(178, 384, 1287);
            this.AddLabel(160, 402, 1161, @"Stargate System v3.0");
            this.AddLabel(171, 418, 1161, @"By FingersMcSteal");

            this.AddButton(410, 40, 5600, 5604, 0, GumpButtonType.Reply, 0); // Facet Code Up +1
            this.AddButton(410, 65, 5602, 5606, 1, GumpButtonType.Reply, 0); // Facet Code Down -1
            this.AddButton(392, 130, 4026, 4028, 2, GumpButtonType.Reply, 0); // Selection 1
            this.AddButton(400, 185, 4026, 4028, 3, GumpButtonType.Reply, 0); // Selection 2
            this.AddButton(400, 254, 4026, 4028, 4, GumpButtonType.Reply, 0); // Selection 3
            this.AddButton(392, 313, 4026, 4028, 5, GumpButtonType.Reply, 0); // Selection 4
            this.AddButton(377, 381, 4026, 4028, 6, GumpButtonType.Reply, 0); // Selection 5
            this.AddButton(30, 371, 4005, 4007, 7, GumpButtonType.Reply, 0); // ACTIVATE
            this.AddButton(30, 393, 4029, 4031, 8, GumpButtonType.Reply, 0); // RESET
            this.AddButton(30, 415, 4017, 4019, 9, GumpButtonType.Reply, 0); // CANCEL
            this.AddButton(387, 419, 22153, 22155, 10, GumpButtonType.Reply, 0); // Help
            this.AddLabel(407, 418, 1153, @"Help");

            // Administrator & GM Functions
            if (from.AccessLevel >= AccessLevel.GameMaster)
            {
                this.AddLabel(65, 351, 1153, @"Administrator & GM Functions");
                this.AddButton(30, 349, 4026, 4028, 11, GumpButtonType.Reply, 0);
            }

           [COLOR="Red"] // Facet List Window
            string NewList = "<BASEFONT COLOR=#00BBFF>The Following Stargates On Your Selected Destination Facet Are Listed Below...<BR><BR><BASEFONT COLOR=#00EEFF>";
            for (int i = 0; i < SGCore.SGList.Count; i++)
            {
                SGEntry sge = (SGEntry)SGCore.SGList[i];
                if (sge.SGFacetCode == sgCURRENTfacet)
                {
                    sgOnThisFacet++;
                    if (!sge.SGHidden)
                    {
                        NewList = (string.Format(NewList) + sge.SGAddressCode1.ToString() + "," + sge.SGAddressCode2.ToString() + "," + sge.SGAddressCode3.ToString() + "," + sge.SGAddressCode4.ToString() + "," + sge.SGAddressCode5.ToString() + " : " + sge.SGLocationName) + "<BR>";
                    }
                    else
                    {
                        sgOnThisHidden++;
                        NewList = (string.Format(NewList)) + "<BASEFONT COLOR=#FF0000>Undiscovered Location ???<BASEFONT COLOR=#00EEFF><BR>";
                    }
                }
            }[/COLOR]
            this.AddLabel(225, 160, 1160, sgOnThisFacet.ToString() );
            this.AddLabel(180, 180, 33, sgOnThisHidden.ToString() );

            this.AddHtml(30, 200, 315, 140, NewList, (bool)false, (bool)true);
        }

        public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;
            int destIndex = 0; // index of destination
            int fromIndex = 0; // index of origin

            if (!from.InRange(m_sgactivatordevice.GetWorldLocation(), 1) || from.Map != m_sgactivatordevice.Map)
            {
                from.SendMessage(88, "You are too far away from the crystal Control Device to use it.");
                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                from.CloseGump(typeof(SGGumpActivatorDevice));
            }
            else
            {
                // Allow use of the gate

                #region selection1
                if (sgTOselectioncounter == 1)
                {
                    switch (info.ButtonID)
                    {
                        case 0:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                sgTOfacetid = sgTOfacetid + 1;
                                if (sgTOfacetid >= 5)
                                {
                                    sgTOfacetid = 5;
                                }
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 1:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                sgTOfacetid = sgTOfacetid - 1;
                                if (sgTOfacetid <= 1)
                                {
                                    sgTOfacetid = 1;
                                }
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 2:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress1 = 1;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 3:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress1 = 2;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 4:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress1 = 3;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 5:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress1 = 4;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 6:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress1 = 5;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 7:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButtonActivate);
                                from.CloseGump(typeof(SGGumpActivatorDevice));

                                // check I can go from here
                                bool stage1check = false;

                                for (int i = 0; i < SGCore.SGList.Count; i++)
                                {
                                    SGEntry sge = (SGEntry)SGCore.SGList[i];
                                    {
                                        if (sge.SGFacetCode == m_sgactivatordevice.SGAFacetNumber && sge.SGAddressCode1 == m_sgactivatordevice.SGAAddressCode1 && sge.SGAddressCode2 == m_sgactivatordevice.SGAAddressCode2 && sge.SGAddressCode3 == m_sgactivatordevice.SGAAddressCode3 && sge.SGAddressCode4 == m_sgactivatordevice.SGAAddressCode4 && sge.SGAddressCode5 == m_sgactivatordevice.SGAAddressCode5)
                                        {
                                            // this gate
                                            fromIndex = i;
                                            if (!sge.SGEnergy)
                                            {
                                                // i can continue
                                                stage1check = true;
                                            }
                                            else
                                            {
                                                from.SendMessage(77, "Someone opened this gate before you, please wait a moment.");

                                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                            }
                                        }
                                    }
                                }

                                if (stage1check)
                                {
                                    // find destination
                                    for (int i = 0; i < SGCore.SGList.Count; i++)
                                    {
                                        SGEntry sge = (SGEntry)SGCore.SGList[i];
                                        if (sge.SGFacetCode == sgTOfacetid && sge.SGAddressCode1 == sgTOaddress1 && sge.SGAddressCode2 == sgTOaddress2 && sge.SGAddressCode3 == sgTOaddress3 && sge.SGAddressCode4 == sgTOaddress4 && sge.SGAddressCode5 == sgTOaddress5)
                                        {
                                            // match
                                            if (sge.SGFacetCode == m_sgactivatordevice.SGAFacetNumber && sge.SGAddressCode1 == m_sgactivatordevice.SGAAddressCode1 && sge.SGAddressCode2 == m_sgactivatordevice.SGAAddressCode2 && sge.SGAddressCode3 == m_sgactivatordevice.SGAAddressCode3 && sge.SGAddressCode4 == m_sgactivatordevice.SGAAddressCode4 && sge.SGAddressCode5 == m_sgactivatordevice.SGAAddressCode5)
                                            {
                                                // Already here (Code selected was same code)
                                                from.SendMessage(77, "Your already there.");
                                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                            }
                                            else
                                            {
                                                // match and different from where you are
                                                destIndex = i;

                                                sgDESTINATIONlocX = sge.SGX;
                                                sgDESTINATIONlocY = sge.SGY;
                                                sgDESTINATIONlocZ = sge.SGZ;
                                                sgDESTINATIONfacing = sge.SGFacing;

                                                sgDESTINATIONfacet = sge.SGFacetCode;
                                                sgDESTINATIONaddress1 = sge.SGAddressCode1;
                                                sgDESTINATIONaddress2 = sge.SGAddressCode2;
                                                sgDESTINATIONaddress3 = sge.SGAddressCode3;
                                                sgDESTINATIONaddress4 = sge.SGAddressCode4;
                                                sgDESTINATIONaddress5 = sge.SGAddressCode5;

                                                sgDESTINATIONbusyused = sge.SGBeingUsed;
                                                sgDESTINATIONbusyenergy = sge.SGEnergy;

                                                if (!sgDESTINATIONbusyenergy)
                                                {
                                                    Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundGoodToGo);

                                                    // setup energy bits
                                                    SGEntry sgeDestination = (SGEntry)SGCore.SGList[destIndex];
                                                    sgeDestination.SGEnergy = true; // turn ON energy bit at DESTINATION gate (stops outbound calls)
                                                    SGEntry sgeOrigin = (SGEntry)SGCore.SGList[fromIndex];
                                                    sgeOrigin.SGEnergy = true; // turn ON energy HERE (stops inbounds)

                                                    m_sgactivatordevice.m_SGABeingUsed = false; // release dialer HERE
                                                    m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                    m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter

                                                    // place SGTeleport Tile into doorway TO THE DESTINATION Location (FROM HERE TO x,y,z)
                                                    if (sgDESTINATIONfacet == 1)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Felucca);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Felucca);
                                                        }
                                                    }

                                                    if (sgDESTINATIONfacet == 2)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Trammel);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Trammel);
                                                        }
                                                    }
                                                    if (sgDESTINATIONfacet == 3)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Ilshenar);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Ilshenar);
                                                        }

                                                    }
                                                    if (sgDESTINATIONfacet == 4)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Malas);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Malas);
                                                        }

                                                    }
                                                    if (sgDESTINATIONfacet == 5)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Tokuno);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Tokuno);
                                                        }

                                                    }
                                                }
                                                else
                                                {
                                                    Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundNoTravel);
                                                    from.SendMessage(77, "The destination is in use, please wait a moment and try again.");
                                                    m_sgactivatordevice.m_SGABeingUsed = false; // release dialer HERE
                                                }
                                            }
                                        }
                                        m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                        m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                        m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                    }
                                }
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                            }
                            break;

                        case 8:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.SendMessage(77, "You reset the dialing sequence");
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress1 = reset;
                                int sgTOaddress2 = reset;
                                int sgTOaddress3 = reset;
                                int sgTOaddress4 = reset;
                                int sgTOaddress5 = reset;
                                sgTOselectioncounter = 1;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 9:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.SendMessage(77, "Cancel selected, you leave the device alone.");
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                            }
                            break;

                        case 10:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.SendMessage(77, "Help Option selected");
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                from.CloseGump(typeof(SGGumpHelp));
                                from.SendGump(new SGGumpHelp());
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 11:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                from.SendGump(new SGGumpActivatorRemoval(m_sgactivatordevice));
                            }
                            break;
                    }
                }
                #endregion selection1

                #region selection2
                else if (sgTOselectioncounter == 2)
                {
                    switch (info.ButtonID)
                    {
                        case 0:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                sgTOfacetid = sgTOfacetid + 1;
                                if (sgTOfacetid >= 5)
                                {
                                    sgTOfacetid = 5;
                                }
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 1:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                sgTOfacetid = sgTOfacetid - 1;
                                if (sgTOfacetid <= 1)
                                {
                                    sgTOfacetid = 1;
                                }
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 2:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress2 = 1;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 3:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress2 = 2;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 4:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress2 = 3;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 5:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress2 = 4;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 6:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress2 = 5;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 7:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButtonActivate);
                                from.CloseGump(typeof(SGGumpActivatorDevice));

                                // check I can go from here
                                bool stage1check = false;

                                for (int i = 0; i < SGCore.SGList.Count; i++)
                                {
                                    SGEntry sge = (SGEntry)SGCore.SGList[i];
                                    {
                                        if (sge.SGFacetCode == m_sgactivatordevice.SGAFacetNumber && sge.SGAddressCode1 == m_sgactivatordevice.SGAAddressCode1 && sge.SGAddressCode2 == m_sgactivatordevice.SGAAddressCode2 && sge.SGAddressCode3 == m_sgactivatordevice.SGAAddressCode3 && sge.SGAddressCode4 == m_sgactivatordevice.SGAAddressCode4 && sge.SGAddressCode5 == m_sgactivatordevice.SGAAddressCode5)
                                        {
                                            // this gate
                                            fromIndex = i;
                                            if (!sge.SGEnergy)
                                            {
                                                // i can continue
                                                stage1check = true;
                                            }
                                            else
                                            {
                                                from.SendMessage(77, "Someone opened this gate before you, please wait a moment.");
                                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                            }
                                        }
                                    }
                                }

                                if (stage1check)
                                {
                                    // find destination
                                    for (int i = 0; i < SGCore.SGList.Count; i++)
                                    {
                                        SGEntry sge = (SGEntry)SGCore.SGList[i];
                                        if (sge.SGFacetCode == sgTOfacetid && sge.SGAddressCode1 == sgTOaddress1 && sge.SGAddressCode2 == sgTOaddress2 && sge.SGAddressCode3 == sgTOaddress3 && sge.SGAddressCode4 == sgTOaddress4 && sge.SGAddressCode5 == sgTOaddress5)
                                        {
                                            // match
                                            if (sge.SGFacetCode == m_sgactivatordevice.SGAFacetNumber && sge.SGAddressCode1 == m_sgactivatordevice.SGAAddressCode1 && sge.SGAddressCode2 == m_sgactivatordevice.SGAAddressCode2 && sge.SGAddressCode3 == m_sgactivatordevice.SGAAddressCode3 && sge.SGAddressCode4 == m_sgactivatordevice.SGAAddressCode4 && sge.SGAddressCode5 == m_sgactivatordevice.SGAAddressCode5)
                                            {
                                                // Already here (Code selected was same code)
                                                from.SendMessage(77, "Your already there.");
                                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                            }
                                            else
                                            {
                                                // match and different from where you are
                                                destIndex = i;

                                                sgDESTINATIONlocX = sge.SGX;
                                                sgDESTINATIONlocY = sge.SGY;
                                                sgDESTINATIONlocZ = sge.SGZ;
                                                sgDESTINATIONfacing = sge.SGFacing;

                                                sgDESTINATIONfacet = sge.SGFacetCode;
                                                sgDESTINATIONaddress1 = sge.SGAddressCode1;
                                                sgDESTINATIONaddress2 = sge.SGAddressCode2;
                                                sgDESTINATIONaddress3 = sge.SGAddressCode3;
                                                sgDESTINATIONaddress4 = sge.SGAddressCode4;
                                                sgDESTINATIONaddress5 = sge.SGAddressCode5;

                                                sgDESTINATIONbusyused = sge.SGBeingUsed;
                                                sgDESTINATIONbusyenergy = sge.SGEnergy;

                                                if (!sgDESTINATIONbusyenergy)
                                                {
                                                    Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundGoodToGo);

                                                    // setup energy bits
                                                    SGEntry sgeDestination = (SGEntry)SGCore.SGList[destIndex];
                                                    sgeDestination.SGEnergy = true; // turn ON energy bit at DESTINATION gate (stops outbound calls)
                                                    SGEntry sgeOrigin = (SGEntry)SGCore.SGList[fromIndex];
                                                    sgeOrigin.SGEnergy = true; // turn ON energy HERE (stops inbounds)

                                                    m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                    m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                    m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counters

                                                    // place SGTeleport Tile into doorway TO THE DESTINATION Location (FROM HERE TO x,y,z)
                                                    if (sgDESTINATIONfacet == 1)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Felucca);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Felucca);
                                                        }
                                                    }

                                                    if (sgDESTINATIONfacet == 2)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Trammel);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Trammel);
                                                        }
                                                    }
                                                    if (sgDESTINATIONfacet == 3)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Ilshenar);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Ilshenar);
                                                        }

                                                    }
                                                    if (sgDESTINATIONfacet == 4)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Malas);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Malas);
                                                        }

                                                    }
                                                    if (sgDESTINATIONfacet == 5)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Tokuno);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Tokuno);
                                                        }

                                                    }
                                                    // check direction of DESTINATION GATE, place energy tiles
                                                }
                                                else
                                                {
                                                    Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundNoTravel);
                                                    from.SendMessage(77, "The destination is in use, please wait a moment and try again.");
                                                    m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                    m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                    m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                                }
                                            }
                                        }
                                        m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                        m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                        m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                    }
                                }
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                            }
                            break;

                        case 8:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.SendMessage(77, "You reset the dialing sequence");
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress1 = reset;
                                int sgTOaddress2 = reset;
                                int sgTOaddress3 = reset;
                                int sgTOaddress4 = reset;
                                int sgTOaddress5 = reset;
                                sgTOselectioncounter = 1;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 9:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                            }
                            break;

                        case 10:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.SendMessage(77, "help");
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                from.CloseGump(typeof(SGGumpHelp));
                                from.SendGump(new SGGumpHelp());
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 11:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                from.SendGump(new SGGumpActivatorRemoval(m_sgactivatordevice));
                            }
                            break;
                    }
                }
                #endregion selection2

                #region selection3
                else if (sgTOselectioncounter == 3)
                {
                    switch (info.ButtonID)
                    {
                        case 0:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                sgTOfacetid = sgTOfacetid + 1;
                                if (sgTOfacetid >= 5)
                                {
                                    sgTOfacetid = 5;
                                }
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 1:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                sgTOfacetid = sgTOfacetid - 1;
                                if (sgTOfacetid <= 1)
                                {
                                    sgTOfacetid = 1;
                                }
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 2:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress3 = 1;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 3:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress3 = 2;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 4:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress3 = 3;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 5:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress3 = 4;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 6:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress3 = 5;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 7:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButtonActivate);
                                from.CloseGump(typeof(SGGumpActivatorDevice));

                                // check I can go from here
                                bool stage1check = false;

                                for (int i = 0; i < SGCore.SGList.Count; i++)
                                {
                                    SGEntry sge = (SGEntry)SGCore.SGList[i];
                                    {
                                        if (sge.SGFacetCode == m_sgactivatordevice.SGAFacetNumber && sge.SGAddressCode1 == m_sgactivatordevice.SGAAddressCode1 && sge.SGAddressCode2 == m_sgactivatordevice.SGAAddressCode2 && sge.SGAddressCode3 == m_sgactivatordevice.SGAAddressCode3 && sge.SGAddressCode4 == m_sgactivatordevice.SGAAddressCode4 && sge.SGAddressCode5 == m_sgactivatordevice.SGAAddressCode5)
                                        {
                                            // this gate
                                            fromIndex = i;
                                            if (!sge.SGEnergy)
                                            {
                                                // i can continue
                                                stage1check = true;
                                            }
                                            else
                                            {
                                                from.SendMessage(77, "Someone opened this gate before you, please wait a moment.");
                                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                            }
                                        }
                                    }
                                }

                                if (stage1check)
                                {
                                    // find destination
                                    for (int i = 0; i < SGCore.SGList.Count; i++)
                                    {
                                        SGEntry sge = (SGEntry)SGCore.SGList[i];
                                        if (sge.SGFacetCode == sgTOfacetid && sge.SGAddressCode1 == sgTOaddress1 && sge.SGAddressCode2 == sgTOaddress2 && sge.SGAddressCode3 == sgTOaddress3 && sge.SGAddressCode4 == sgTOaddress4 && sge.SGAddressCode5 == sgTOaddress5)
                                        {
                                            // match
                                            if (sge.SGFacetCode == m_sgactivatordevice.SGAFacetNumber && sge.SGAddressCode1 == m_sgactivatordevice.SGAAddressCode1 && sge.SGAddressCode2 == m_sgactivatordevice.SGAAddressCode2 && sge.SGAddressCode3 == m_sgactivatordevice.SGAAddressCode3 && sge.SGAddressCode4 == m_sgactivatordevice.SGAAddressCode4 && sge.SGAddressCode5 == m_sgactivatordevice.SGAAddressCode5)
                                            {
                                                // Already here (Code selected was same code)
                                                from.SendMessage(77, "Your already there.");
                                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                            }
                                            else
                                            {
                                                // match and different from where you are
                                                destIndex = i;

                                                sgDESTINATIONlocX = sge.SGX;
                                                sgDESTINATIONlocY = sge.SGY;
                                                sgDESTINATIONlocZ = sge.SGZ;
                                                sgDESTINATIONfacing = sge.SGFacing;

                                                sgDESTINATIONfacet = sge.SGFacetCode;
                                                sgDESTINATIONaddress1 = sge.SGAddressCode1;
                                                sgDESTINATIONaddress2 = sge.SGAddressCode2;
                                                sgDESTINATIONaddress3 = sge.SGAddressCode3;
                                                sgDESTINATIONaddress4 = sge.SGAddressCode4;
                                                sgDESTINATIONaddress5 = sge.SGAddressCode5;

                                                sgDESTINATIONbusyused = sge.SGBeingUsed;
                                                sgDESTINATIONbusyenergy = sge.SGEnergy;

                                                if (!sgDESTINATIONbusyenergy)
                                                {
                                                    Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundGoodToGo);

                                                    // setup energy bits
                                                    SGEntry sgeDestination = (SGEntry)SGCore.SGList[destIndex];
                                                    sgeDestination.SGEnergy = true; // turn ON energy bit at DESTINATION gate (stops outbound calls)
                                                    SGEntry sgeOrigin = (SGEntry)SGCore.SGList[fromIndex];
                                                    sgeOrigin.SGEnergy = true; // turn ON energy HERE (stops inbounds)

                                                    m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                    m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                    m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter

                                                    // place SGTeleport Tile into doorway TO THE DESTINATION Location (FROM HERE TO x,y,z)
                                                    if (sgDESTINATIONfacet == 1)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Felucca);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Felucca);
                                                        }
                                                    }

                                                    if (sgDESTINATIONfacet == 2)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Trammel);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Trammel);
                                                        }
                                                    }
                                                    if (sgDESTINATIONfacet == 3)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Ilshenar);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Ilshenar);
                                                        }

                                                    }
                                                    if (sgDESTINATIONfacet == 4)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Malas);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Malas);
                                                        }

                                                    }
                                                    if (sgDESTINATIONfacet == 5)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Tokuno);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Tokuno);
                                                        }

                                                    }
                                                    // check direction of DESTINATION GATE, place energy tiles
                                                }
                                                else
                                                {
                                                    Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundNoTravel);
                                                    from.SendMessage(77, "The destination is in use, please wait a moment and try again.");
                                                    m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                    m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                    m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                                }
                                            }
                                        }
                                        m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                        m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                        m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                    }
                                }
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                            }
                            break;

                        case 8:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.SendMessage(77, "You reset the dialing sequence");
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress1 = reset;
                                int sgTOaddress2 = reset;
                                int sgTOaddress3 = reset;
                                int sgTOaddress4 = reset;
                                int sgTOaddress5 = reset;
                                sgTOselectioncounter = 1;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 9:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                            }
                            break;

                        case 10:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.SendMessage(77, "help");
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                from.CloseGump(typeof(SGGumpHelp));
                                from.SendGump(new SGGumpHelp());
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 11:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                from.SendGump(new SGGumpActivatorRemoval(m_sgactivatordevice));
                            }
                            break;
                    }
                }
                #endregion selection3

                #region selection4
                else if (sgTOselectioncounter == 4)
                {
                    switch (info.ButtonID)
                    {
                        case 0:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                sgTOfacetid = sgTOfacetid + 1;
                                if (sgTOfacetid >= 5)
                                {
                                    sgTOfacetid = 5;
                                }
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 1:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                sgTOfacetid = sgTOfacetid - 1;
                                if (sgTOfacetid <= 1)
                                {
                                    sgTOfacetid = 1;
                                }
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 2:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress4 = 1;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 3:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress4 = 2;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 4:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress4 = 3;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 5:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress4 = 4;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 6:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress4 = 5;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 7:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButtonActivate);
                                from.CloseGump(typeof(SGGumpActivatorDevice));

                                // check I can go from here
                                bool stage1check = false;

                                for (int i = 0; i < SGCore.SGList.Count; i++)
                                {
                                    SGEntry sge = (SGEntry)SGCore.SGList[i];
                                    {
                                        if (sge.SGFacetCode == m_sgactivatordevice.SGAFacetNumber && sge.SGAddressCode1 == m_sgactivatordevice.SGAAddressCode1 && sge.SGAddressCode2 == m_sgactivatordevice.SGAAddressCode2 && sge.SGAddressCode3 == m_sgactivatordevice.SGAAddressCode3 && sge.SGAddressCode4 == m_sgactivatordevice.SGAAddressCode4 && sge.SGAddressCode5 == m_sgactivatordevice.SGAAddressCode5)
                                        {
                                            // this gate
                                            fromIndex = i;
                                            if (!sge.SGEnergy)
                                            {
                                                // i can continue
                                                stage1check = true;
                                            }
                                            else
                                            {
                                                from.SendMessage(77, "Someone opened this gate before you, please wait a moment.");
                                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                            }
                                        }
                                    }
                                }

                                if (stage1check)
                                {
                                    // find destination
                                    for (int i = 0; i < SGCore.SGList.Count; i++)
                                    {
                                        SGEntry sge = (SGEntry)SGCore.SGList[i];
                                        if (sge.SGFacetCode == sgTOfacetid && sge.SGAddressCode1 == sgTOaddress1 && sge.SGAddressCode2 == sgTOaddress2 && sge.SGAddressCode3 == sgTOaddress3 && sge.SGAddressCode4 == sgTOaddress4 && sge.SGAddressCode5 == sgTOaddress5)
                                        {
                                            // match
                                            if (sge.SGFacetCode == m_sgactivatordevice.SGAFacetNumber && sge.SGAddressCode1 == m_sgactivatordevice.SGAAddressCode1 && sge.SGAddressCode2 == m_sgactivatordevice.SGAAddressCode2 && sge.SGAddressCode3 == m_sgactivatordevice.SGAAddressCode3 && sge.SGAddressCode4 == m_sgactivatordevice.SGAAddressCode4 && sge.SGAddressCode5 == m_sgactivatordevice.SGAAddressCode5)
                                            {
                                                // Already here (Code selected was same code)
                                                from.SendMessage(77, "Your already there.");
                                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                            }
                                            else
                                            {
                                                // match and different from where you are
                                                destIndex = i;

                                                sgDESTINATIONlocX = sge.SGX;
                                                sgDESTINATIONlocY = sge.SGY;
                                                sgDESTINATIONlocZ = sge.SGZ;
                                                sgDESTINATIONfacing = sge.SGFacing;

                                                sgDESTINATIONfacet = sge.SGFacetCode;
                                                sgDESTINATIONaddress1 = sge.SGAddressCode1;
                                                sgDESTINATIONaddress2 = sge.SGAddressCode2;
                                                sgDESTINATIONaddress3 = sge.SGAddressCode3;
                                                sgDESTINATIONaddress4 = sge.SGAddressCode4;
                                                sgDESTINATIONaddress5 = sge.SGAddressCode5;

                                                sgDESTINATIONbusyused = sge.SGBeingUsed;
                                                sgDESTINATIONbusyenergy = sge.SGEnergy;

                                                if (!sgDESTINATIONbusyenergy)
                                                {
                                                    Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundGoodToGo);

                                                    // setup energy bits
                                                    SGEntry sgeDestination = (SGEntry)SGCore.SGList[destIndex];
                                                    sgeDestination.SGEnergy = true; // turn ON energy bit at DESTINATION gate (stops outbound calls)
                                                    SGEntry sgeOrigin = (SGEntry)SGCore.SGList[fromIndex];
                                                    sgeOrigin.SGEnergy = true; // turn ON energy HERE (stops inbounds)

                                                    m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                    m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                    m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter

                                                    // place SGTeleport Tile into doorway TO THE DESTINATION Location (FROM HERE TO x,y,z)
                                                    if (sgDESTINATIONfacet == 1)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Felucca);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Felucca);
                                                        }
                                                    }

                                                    if (sgDESTINATIONfacet == 2)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Trammel);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Trammel);
                                                        }
                                                    }
                                                    if (sgDESTINATIONfacet == 3)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Ilshenar);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Ilshenar);
                                                        }

                                                    }
                                                    if (sgDESTINATIONfacet == 4)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Malas);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Malas);
                                                        }

                                                    }
                                                    if (sgDESTINATIONfacet == 5)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Tokuno);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Tokuno);
                                                        }

                                                    }
                                                    // check direction of DESTINATION GATE, place energy tiles
                                                }
                                                else
                                                {
                                                    Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundNoTravel);
                                                    from.SendMessage(77, "The destination is in use, please wait a moment and try again.");
                                                    m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                    m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                    m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                                }
                                            }
                                        }
                                        m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                        m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                        m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                    }
                                }
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                            }
                            break;

                        case 8:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.SendMessage(77, "You reset the dialing sequence");
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress1 = reset;
                                int sgTOaddress2 = reset;
                                int sgTOaddress3 = reset;
                                int sgTOaddress4 = reset;
                                int sgTOaddress5 = reset;
                                sgTOselectioncounter = 1;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 9:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                            }
                            break;

                        case 10:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.SendMessage(77, "help");
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                from.CloseGump(typeof(SGGumpHelp));
                                from.SendGump(new SGGumpHelp());
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 11:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                from.SendGump(new SGGumpActivatorRemoval(m_sgactivatordevice));
                            }
                            break;
                    }
                }
                #endregion selection4

                #region selection5
                else if (sgTOselectioncounter == 5)
                {
                    switch (info.ButtonID)
                    {
                        case 0:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                sgTOfacetid = sgTOfacetid + 1;
                                if (sgTOfacetid >= 5)
                                {
                                    sgTOfacetid = 5;
                                }
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 1:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                sgTOfacetid = sgTOfacetid - 1;
                                if (sgTOfacetid <= 1)
                                {
                                    sgTOfacetid = 1;
                                }
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 2:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress5 = 1;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 3:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress5 = 2;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 4:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress5 = 3;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 5:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress5 = 4;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 6:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress5 = 5;
                                sgTOselectioncounter++;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 7:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButtonActivate);
                                from.CloseGump(typeof(SGGumpActivatorDevice));

                                // check I can go from here
                                bool stage1check = false;

                                for (int i = 0; i < SGCore.SGList.Count; i++)
                                {
                                    SGEntry sge = (SGEntry)SGCore.SGList[i];
                                    {
                                        if (sge.SGFacetCode == m_sgactivatordevice.SGAFacetNumber && sge.SGAddressCode1 == m_sgactivatordevice.SGAAddressCode1 && sge.SGAddressCode2 == m_sgactivatordevice.SGAAddressCode2 && sge.SGAddressCode3 == m_sgactivatordevice.SGAAddressCode3 && sge.SGAddressCode4 == m_sgactivatordevice.SGAAddressCode4 && sge.SGAddressCode5 == m_sgactivatordevice.SGAAddressCode5)
                                        {
                                            // this gate
                                            fromIndex = i;
                                            if (!sge.SGEnergy)
                                            {
                                                // i can continue
                                                stage1check = true;
                                            }
                                            else
                                            {
                                                from.SendMessage(77, "Someone opened this gate before you, please wait a moment.");
                                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                            }
                                        }
                                    }
                                }

                                if (stage1check)
                                {
                                    // find destination
                                    for (int i = 0; i < SGCore.SGList.Count; i++)
                                    {
                                        SGEntry sge = (SGEntry)SGCore.SGList[i];
                                        if (sge.SGFacetCode == sgTOfacetid && sge.SGAddressCode1 == sgTOaddress1 && sge.SGAddressCode2 == sgTOaddress2 && sge.SGAddressCode3 == sgTOaddress3 && sge.SGAddressCode4 == sgTOaddress4 && sge.SGAddressCode5 == sgTOaddress5)
                                        {
                                            // match
                                            if (sge.SGFacetCode == m_sgactivatordevice.SGAFacetNumber && sge.SGAddressCode1 == m_sgactivatordevice.SGAAddressCode1 && sge.SGAddressCode2 == m_sgactivatordevice.SGAAddressCode2 && sge.SGAddressCode3 == m_sgactivatordevice.SGAAddressCode3 && sge.SGAddressCode4 == m_sgactivatordevice.SGAAddressCode4 && sge.SGAddressCode5 == m_sgactivatordevice.SGAAddressCode5)
                                            {
                                                // Already here (Code selected was same code)
                                                from.SendMessage(77, "Your already there.");
                                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                            }
                                            else
                                            {
                                                // match and different from where you are
                                                destIndex = i;

                                                sgDESTINATIONlocX = sge.SGX;
                                                sgDESTINATIONlocY = sge.SGY;
                                                sgDESTINATIONlocZ = sge.SGZ;
                                                sgDESTINATIONfacing = sge.SGFacing;

                                                sgDESTINATIONfacet = sge.SGFacetCode;
                                                sgDESTINATIONaddress1 = sge.SGAddressCode1;
                                                sgDESTINATIONaddress2 = sge.SGAddressCode2;
                                                sgDESTINATIONaddress3 = sge.SGAddressCode3;
                                                sgDESTINATIONaddress4 = sge.SGAddressCode4;
                                                sgDESTINATIONaddress5 = sge.SGAddressCode5;

                                                sgDESTINATIONbusyused = sge.SGBeingUsed;
                                                sgDESTINATIONbusyenergy = sge.SGEnergy;

                                                if (!sgDESTINATIONbusyenergy)
                                                {
                                                    Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundGoodToGo);

                                                    // setup energy bits
                                                    SGEntry sgeDestination = (SGEntry)SGCore.SGList[destIndex];
                                                    sgeDestination.SGEnergy = true; // turn ON energy bit at DESTINATION gate (stops outbound calls)
                                                    SGEntry sgeOrigin = (SGEntry)SGCore.SGList[fromIndex];
                                                    sgeOrigin.SGEnergy = true; // turn ON energy HERE (stops inbounds)

                                                    m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                    m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                    m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter

                                                    // place SGTeleport Tile into doorway TO THE DESTINATION Location (FROM HERE TO x,y,z)
                                                    if (sgDESTINATIONfacet == 1)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Felucca);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Felucca);
                                                        }
                                                    }

                                                    if (sgDESTINATIONfacet == 2)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Trammel);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Trammel);
                                                        }
                                                    }
                                                    if (sgDESTINATIONfacet == 3)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Ilshenar);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Ilshenar);
                                                        }

                                                    }
                                                    if (sgDESTINATIONfacet == 4)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Malas);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Malas);
                                                        }

                                                    }
                                                    if (sgDESTINATIONfacet == 5)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Tokuno);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Tokuno);
                                                        }

                                                    }
                                                }
                                                else
                                                {
                                                    Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundNoTravel);
                                                    from.SendMessage(77, "The destination is in use, please wait a moment and try again.");
                                                    m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                    m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                    m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                                }
                                            }
                                        }
                                        m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                        m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                        m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                    }
                                }
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                            }
                            break;

                        case 8:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.SendMessage(77, "You reset the dialing sequence");
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress1 = reset;
                                int sgTOaddress2 = reset;
                                int sgTOaddress3 = reset;
                                int sgTOaddress4 = reset;
                                int sgTOaddress5 = reset;
                                sgTOselectioncounter = 1;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 9:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                            }
                            break;

                        case 10:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.SendMessage(77, "help");
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                from.CloseGump(typeof(SGGumpHelp));
                                from.SendGump(new SGGumpHelp());
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 11:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                from.SendGump(new SGGumpActivatorRemoval(m_sgactivatordevice));
                            }
                            break;
                    }
                }
                #endregion selection5

                #region selection6
                else if (sgTOselectioncounter == 6)
                {
                    switch (info.ButtonID)
                    {
                        case 0:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                sgTOfacetid = sgTOfacetid + 1;
                                if (sgTOfacetid >= 5)
                                {
                                    sgTOfacetid = 5;
                                }
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 1:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                sgTOfacetid = sgTOfacetid - 1;
                                if (sgTOfacetid <= 1)
                                {
                                    sgTOfacetid = 1;
                                }
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 2:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                from.PublicOverheadMessage(MessageType.Whisper, 0, false, "Activate / Reset or Cancel");
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 3:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                from.PublicOverheadMessage(MessageType.Whisper, 0, false, "Activate / Reset or Cancel");
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 4:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                from.PublicOverheadMessage(MessageType.Whisper, 0, false, "Activate / Reset or Cancel");
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 5:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                from.PublicOverheadMessage(MessageType.Whisper, 0, false, "Activate / Reset or Cancel");
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 6:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                from.PublicOverheadMessage(MessageType.Whisper, 0, false, "Activate / Reset or Cancel");
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 7:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButtonActivate);
                                from.CloseGump(typeof(SGGumpActivatorDevice));

                                // check I can go from here
                                bool stage1check = false;

                                for (int i = 0; i < SGCore.SGList.Count; i++)
                                {
                                    SGEntry sge = (SGEntry)SGCore.SGList[i];
                                    {
                                        if (sge.SGFacetCode == m_sgactivatordevice.SGAFacetNumber && sge.SGAddressCode1 == m_sgactivatordevice.SGAAddressCode1 && sge.SGAddressCode2 == m_sgactivatordevice.SGAAddressCode2 && sge.SGAddressCode3 == m_sgactivatordevice.SGAAddressCode3 && sge.SGAddressCode4 == m_sgactivatordevice.SGAAddressCode4 && sge.SGAddressCode5 == m_sgactivatordevice.SGAAddressCode5)
                                        {
                                            // this gate
                                            fromIndex = i;
                                            if (!sge.SGEnergy)
                                            {
                                                // i can continue
                                                stage1check = true;
                                            }
                                            else
                                            {
                                                from.SendMessage(77, "Someone opened this gate before you, please wait a moment.");
                                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                            }
                                        }
                                    }
                                }

                                if (stage1check)
                                {
                                    // find destination
                                    for (int i = 0; i < SGCore.SGList.Count; i++)
                                    {
                                        SGEntry sge = (SGEntry)SGCore.SGList[i];
                                        if (sge.SGFacetCode == sgTOfacetid && sge.SGAddressCode1 == sgTOaddress1 && sge.SGAddressCode2 == sgTOaddress2 && sge.SGAddressCode3 == sgTOaddress3 && sge.SGAddressCode4 == sgTOaddress4 && sge.SGAddressCode5 == sgTOaddress5)
                                        {
                                            // match
                                            if (sge.SGFacetCode == m_sgactivatordevice.SGAFacetNumber && sge.SGAddressCode1 == m_sgactivatordevice.SGAAddressCode1 && sge.SGAddressCode2 == m_sgactivatordevice.SGAAddressCode2 && sge.SGAddressCode3 == m_sgactivatordevice.SGAAddressCode3 && sge.SGAddressCode4 == m_sgactivatordevice.SGAAddressCode4 && sge.SGAddressCode5 == m_sgactivatordevice.SGAAddressCode5)
                                            {
                                                // Already here (Code selected was same code)
                                                from.SendMessage(77, "Your already at the location you dialed.");
                                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                            }
                                            else
                                            {
                                                // match and different from where you are
                                                destIndex = i;

                                                sgDESTINATIONlocX = sge.SGX;
                                                sgDESTINATIONlocY = sge.SGY;
                                                sgDESTINATIONlocZ = sge.SGZ;
                                                sgDESTINATIONfacing = sge.SGFacing;

                                                sgDESTINATIONfacet = sge.SGFacetCode;
                                                sgDESTINATIONaddress1 = sge.SGAddressCode1;
                                                sgDESTINATIONaddress2 = sge.SGAddressCode2;
                                                sgDESTINATIONaddress3 = sge.SGAddressCode3;
                                                sgDESTINATIONaddress4 = sge.SGAddressCode4;
                                                sgDESTINATIONaddress5 = sge.SGAddressCode5;

                                                sgDESTINATIONbusyused = sge.SGBeingUsed;
                                                sgDESTINATIONbusyenergy = sge.SGEnergy;

                                                if (!sgDESTINATIONbusyenergy)
                                                {
                                                    Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundGoodToGo);
                                                    // No energy field at DESTINATION gate, set bits
                                                    SGEntry sgeDestination = (SGEntry)SGCore.SGList[destIndex];
                                                    sgeDestination.SGEnergy = true; // turn ON energy bit at DESTINATION gate (stops outbound calls)
                                                    SGEntry sgeOrigin = (SGEntry)SGCore.SGList[fromIndex];
                                                    sgeOrigin.SGEnergy = true; // turn ON energy HERE (stops inbounds)

                                                    m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                    m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                    m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter

                                                    // place SGTeleport Tile into doorway TO THE DESTINATION Location (FROM HERE TO x,y,z)
                                                    if (sgDESTINATIONfacet == 1)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Felucca);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Felucca);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Felucca);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Felucca);
                                                        }
                                                    }

                                                    if (sgDESTINATIONfacet == 2)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Trammel);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Trammel);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Trammel);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Trammel);
                                                        }
                                                    }
                                                    if (sgDESTINATIONfacet == 3)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Ilshenar);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Ilshenar);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Ilshenar);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Ilshenar);
                                                        }

                                                    }
                                                    if (sgDESTINATIONfacet == 4)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Malas);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Malas);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Malas);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Malas);
                                                        }

                                                    }
                                                    if (sgDESTINATIONfacet == 5)
                                                    {
                                                        // Tile FROM Here TO Destination
                                                        SGFieldTile SGTileFROM = new SGFieldTile(fromIndex, destIndex, new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                        SGTileFROM.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        // Tile FROM Destination To Here
                                                        SGFieldTile SGTileBACK = new SGFieldTile(fromIndex, destIndex, new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        SGTileBACK.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);

                                                        // ORIGIN ENERGY FIELD
                                                        if (m_sgactivatordevice.SGAFacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldEast SGEnergyTile2 = new SGEFieldEast(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        else if (m_sgactivatordevice.SGAFacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(fromIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile1.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 15), m_sgactivatordevice.Map);
                                                            SGEFieldSouth SGEnergyTile2 = new SGEFieldSouth(m_sgactivatordevice.Location, m_sgactivatordevice.Map);
                                                            SGEnergyTile2.MoveToWorld(new Point3D(m_sgactivatordevice.X - 2, m_sgactivatordevice.Y + 2, m_sgactivatordevice.Z + 5), m_sgactivatordevice.Map);
                                                        }
                                                        // DESTINATION ENERGY FIELD
                                                        if (sgDESTINATIONfacing == "E")
                                                        {
                                                            SGCore.SGEffectEastWest(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldEast SGEnergyTile1d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                            SGEFieldEast SGEnergyTile2d = new SGEFieldEast(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Tokuno);
                                                        }
                                                        else if (sgDESTINATIONfacing == "S")
                                                        {
                                                            SGCore.SGEffectNorthSouth(destIndex);
                                                            // place energy field in doorway
                                                            SGEFieldSouth SGEnergyTile1d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile1d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 5), Map.Tokuno);
                                                            SGEFieldSouth SGEnergyTile2d = new SGEFieldSouth(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ), Map.Tokuno);
                                                            SGEnergyTile2d.MoveToWorld(new Point3D(sgDESTINATIONlocX, sgDESTINATIONlocY, sgDESTINATIONlocZ + 15), Map.Tokuno);
                                                        }

                                                    }
                                                }
                                                else
                                                {
                                                    Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundNoTravel);
                                                    from.SendMessage(77, "The destination is in use, please wait a moment and try again.");
                                                    m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                                    m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                                    m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                                }
                                            }
                                        }
                                        m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                        m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                        m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                    }
                                }
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                            }
                            break;

                        case 8:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.SendMessage(77, "You reset the dialing sequence");
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                int sgTOaddress1 = reset;
                                int sgTOaddress2 = reset;
                                int sgTOaddress3 = reset;
                                int sgTOaddress4 = reset;
                                int sgTOaddress5 = reset;
                                sgTOselectioncounter = 1;
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 9:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                            }
                            break;

                        case 10:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.SendMessage(77, "help");
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                from.CloseGump(typeof(SGGumpHelp));
                                from.SendGump(new SGGumpHelp());
                                from.SendGump(new SGGumpActivatorDevice(from, m_sgactivatordevice, sgTOselectioncounter, sgTOfacetid, sgTOaddress1, sgTOaddress2, sgTOaddress3, sgTOaddress4, sgTOaddress5));
                            }
                            break;

                        case 11:
                            {
                                Effects.PlaySound(m_sgactivatordevice.Location, m_sgactivatordevice.Map, SGCore.SGSystemSoundButton);
                                from.CloseGump(typeof(SGGumpActivatorDevice));
                                m_sgactivatordevice.m_SGABeingUsed = false; // release dialer
                                m_sgactivatordevice.m_WhoClickedIt = "Blank"; // Reset Who clicked it value
                                m_sgactivatordevice.m_TimerCounter = 0; // Reset Timer Counter
                                from.SendGump(new SGGumpActivatorRemoval(m_sgactivatordevice));
                            }
                            break;
                    }
                }
            }
            #endregion selection6
        }
    }

    public class SGEFieldEast : SGEnergyFieldEast
    {
        public SGEFieldEast(Point3D from, Map map) : base(from, map)
        {
            Map = map;
            InternalTimer t = new InternalTimer(this);
            t.Start();
        }

        public SGEFieldEast(Serial serial) : base(serial)
        {
        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            Delete();
        }

        private class InternalTimer : Timer
        {
            private Item m_Item;

            public InternalTimer(Item item) : base(TimeSpan.FromSeconds(SGCore.SGSystemGateTime))
            {
                Priority = TimerPriority.OneSecond;
                m_Item = item;
            }

            protected override void OnTick()
            {
                m_Item.Delete();
            }
        }
    }

    public class SGEFieldSouth : SGEnergyFieldSouth
    {
        public SGEFieldSouth(Point3D from, Map map) : base(from, map)
        {
            Map = map;
            InternalTimer t = new InternalTimer(this);
            t.Start();
        }

        public SGEFieldSouth(Serial serial) : base(serial)
        {
        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            Delete();
        }

        private class InternalTimer : Timer
        {
            private Item m_Item;

            public InternalTimer(Item item) : base(TimeSpan.FromSeconds(SGCore.SGSystemGateTime))
            {
                Priority = TimerPriority.OneSecond;
                m_Item = item;
            }

            protected override void OnTick()
            {
                m_Item.Delete();
            }
        }
    }

    public class SGFieldTile : SGTransportTile
    {
        private int m_FromID;
        private int m_ToID;

        public int FromID
        {
            get { return m_FromID; }
            set { m_FromID = value; InvalidateProperties(); }
        }

        public int ToID
        {
            get { return m_ToID; }
            set { m_ToID = value; InvalidateProperties(); }
        }

        public SGFieldTile(int frm, int des, Point3D from, Map map) : base(from, map)
        {
            m_FromID = frm;
            m_ToID = des;
            Map = map;
            InternalTimer t = new InternalTimer(this, this);
            t.Start();
        }

        public SGFieldTile(Serial serial) : base(serial)
        {
        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            Delete();
        }

        public class InternalTimer : Timer
        {
            private SGFieldTile m_sgfieldtile;
            private Item m_Item;

            public InternalTimer(SGFieldTile m, Item item) : base(TimeSpan.FromSeconds(SGCore.SGSystemGateTime))
            {
                m_sgfieldtile = m;
                m_Item = item;

                Priority = TimerPriority.OneSecond;
            }

            protected override void OnTick()
            {
                SGEntry sgorigin = (SGEntry)SGCore.SGList[m_sgfieldtile.FromID];
                SGEntry sgdest = (SGEntry)SGCore.SGList[m_sgfieldtile.ToID];

                sgorigin.SGEnergy = false;
                sgdest.SGEnergy = false;

                m_Item.Delete();
            }
        }
    }
}

But I don't know WHAT to change it too to keep the gates from being listed. Can anyone help out?
 

jhs59

Sorceror
Hmm.. That looks right. I've been wanting to do this too. Why don't we both give it a shot and see if it works. :)
 

nadious

Sorceror
I'm sure it's just a matter of making it to where both active and hidden gates aren't displayed (or more or less, the data isn't called upon in the gump, so it's blank), but I'm not good enough with scripting to know what I need to change it too / delete / remove / whatever. :)
 

nadious

Sorceror
Ok, this seemed to work!

Remove the code in red (in my post above), plus, comment out this line:

Code:
this.AddHtml(30, 200, 315, 140, NewList, (bool)false, (bool)true);

The gate still tells you how many there are and how many are hidden, you could also comment out those if you wanted too.
 
Top