コード例 #1
0
        public override void OnResponse(NetState ns, RelayInfo info)
        {
            Mobile mob_m = ns.Mobile;

            PlayerMobile pm = mob_m as PlayerMobile;

            UOETool dd = i_Tool as UOETool;

            if (pm == null || dd == null)
            {
                return;
            }

            int si;

            TextRelay entry1 = info.GetTextEntry(1);
            string    text1  = (entry1 == null ? "" : entry1.Text.Trim());
            bool      r1     = Int32.TryParse(text1, out si);

            if (r1 != false)
            {
                dd.Hue_T = si;
            }

            TextRelay entry2 = info.GetTextEntry(2);
            string    text2  = (entry2 == null ? "" : entry2.Text.Trim());
            bool      r2     = Int32.TryParse(text2, out si);

            if (r2 != false)
            {
                dd.c_Font = si;
            }

            TextRelay entry3 = info.GetTextEntry(3);
            string    text3  = (entry3 == null ? "" : entry3.Text.Trim());
            bool      r3     = Int32.TryParse(text3, out si);

            if (r3 != false)
            {
                dd.Hue_G = si;
            }

            switch (info.ButtonID)
            {
            case 0:
            {
                pm.SendMessage(pm.Name + ", Thanks for using the UO Editor!");

                dd.SendSYSBCK(pm, dd);

                break;
            }

            case 1:
            {
                if (pm.HasGump(typeof(PickUOE)))
                {
                    pm.CloseGump(typeof(PickUOE));
                }
                pm.SendGump(new PickUOE(pm, dd.p_Page));

                if (pm.HasGump(typeof(SettingUOE)))
                {
                    pm.CloseGump(typeof(SettingUOE));
                }
                pm.SendGump(new SettingUOE(pm, dd.p_Page));

                if (dd.SndOn == true)
                {
                    pm.PlaySound(dd.Snd5);
                }

                break;
            }

            case 2:
            {
                if (dd.SndOn == false)
                {
                    dd.SndOn = true;
                }
                else
                {
                    dd.SndOn = false;
                }

                dd.SendSYSBCK(pm, dd);

                if (dd.SndOn == true)
                {
                    pm.PlaySound(dd.Snd5);
                }

                break;
            }

            case 3:
            {
                bool HueCK = dd.HueCKUOE(pm, dd);

                if (HueCK == false)
                {
                    pm.SendMessage(pm.Name + ", You can only enter 1-3000 for the value!");

                    dd.SendSYSBCK(pm, dd);

                    if (dd.SndOn == true)
                    {
                        pm.PlaySound(dd.Snd7);
                    }

                    break;
                }

                pm.SendMessage(pm.Name + ", Font Color Loaded!");

                dd.SendSYSBCK(pm, dd);

                if (dd.SndOn == true)
                {
                    pm.PlaySound(dd.Snd5);
                }

                break;
            }

            case 4:
            {
                pm.SendGump(new HelpUOE(pm, dd.p_Page));
                pm.SendGump(new SettingUOE(pm, dd.p_Page));

                if (dd.SndOn == true)
                {
                    pm.PlaySound(dd.Snd5);
                }

                break;
            }

            case 5:
            {
                string UpdateBR = "http://www.golddraco13.com/UO/UOEUD.swf";

                pm.LaunchBrowser(UpdateBR);

                dd.SendSYSBCK(pm, dd);

                if (dd.SndOn == true)
                {
                    pm.PlaySound(dd.Snd5);
                }

                break;
            }
            }
        }
コード例 #2
0
        public override void OnResponse(NetState ns, RelayInfo info)
        {
            Mobile mob_m = ns.Mobile;

            PlayerMobile pm = mob_m as PlayerMobile;

            UOETool dd = i_Tool as UOETool;

            if (pm == null || dd == null)
            {
                return;
            }

            int si;

            TextRelay entry1 = info.GetTextEntry(1);
            string    text1  = (entry1 == null ? "" : entry1.Text.Trim());
            bool      r1     = Int32.TryParse(text1, out si);

            if (r1 != false)
            {
                dd.Hue_S = si;
            }

            switch (info.ButtonID)
            {
            case 0:
            {
                pm.SendMessage(pm.Name + ", Thanks for using the UO Editor!");

                dd.SendSYSBCK(pm, dd);

                break;
            }

            case 1:
            {
                bool HueCK = dd.HueCKUOE(pm, dd);

                if (HueCK == false)
                {
                    pm.SendMessage(pm.Name + ", You can only enter 1-3000 for the value!");

                    dd.SendSYSBCK(pm, dd);

                    if (dd.SndOn == true)
                    {
                        pm.PlaySound(dd.Snd7);
                    }

                    break;
                }

                if (dd.StcT == true)
                {
                    if (dd.MultiT == true)
                    {
                        CommandSystem.Handle(pm, String.Format("{0}m SetStaticHue {1}", CommandSystem.Prefix, dd.Hue_S));
                    }
                    else
                    {
                        CommandSystem.Handle(pm, String.Format("{0}SetStaticHue {1}", CommandSystem.Prefix, dd.Hue_S));
                    }

                    dd.SendSYSBCK(pm, dd);

                    pm.PlaySound(dd.Snd8);

                    break;
                }
                dd.SendSYSBCK(pm, dd);

                break;
            }
            }
        }
コード例 #3
0
        public override void OnResponse(NetState ns, RelayInfo info)
        {
            Mobile mob_m = ns.Mobile;

            PlayerMobile pm = mob_m as PlayerMobile;

            UOETool dd = i_Tool as UOETool;

            if (pm == null || dd == null)
            {
                return;
            }

            int si;

            if (dd.StcT == true)
            {
                TextRelay entry1 = info.GetTextEntry(1);
                string    text1  = (entry1 == null ? "" : entry1.Text.Trim());
                bool      r1     = Int32.TryParse(text1, out si);
                if (r1 != false)
                {
                    dd.StcID = si;
                }

                if (dd.MultiT == false)
                {
                    TextRelay entry2 = info.GetTextEntry(2);
                    string    text2  = (entry2 == null ? "" : entry2.Text.Trim());
                    bool      r2     = Int32.TryParse(text2, out si);
                    if (r2 != false)
                    {
                        dd.StcX = si;
                    }

                    TextRelay entry3 = info.GetTextEntry(3);
                    string    text3  = (entry3 == null ? "" : entry3.Text.Trim());
                    bool      r3     = Int32.TryParse(text3, out si);
                    if (r3 != false)
                    {
                        dd.StcY = si;
                    }

                    TextRelay entry4 = info.GetTextEntry(4);
                    string    text4  = (entry4 == null ? "" : entry4.Text.Trim());
                    bool      r4     = Int32.TryParse(text4, out si);
                    if (r4 != false)
                    {
                        dd.StcZ = si;
                    }
                }
            }

            if (dd.LndT == true)
            {
                TextRelay entry1 = info.GetTextEntry(1);
                string    text1  = (entry1 == null ? "" : entry1.Text.Trim());
                bool      r1     = Int32.TryParse(text1, out si);
                if (r1 != false)
                {
                    dd.LndID = si;
                }

                if (dd.MultiT == false)
                {
                    TextRelay entry2 = info.GetTextEntry(2);
                    string    text2  = (entry2 == null ? "" : entry2.Text.Trim());
                    bool      r2     = Int32.TryParse(text2, out si);
                    if (r2 != false)
                    {
                        dd.LndX = si;
                    }

                    TextRelay entry3 = info.GetTextEntry(3);
                    string    text3  = (entry3 == null ? "" : entry3.Text.Trim());
                    bool      r3     = Int32.TryParse(text3, out si);
                    if (r3 != false)
                    {
                        dd.LndY = si;
                    }

                    TextRelay entry4 = info.GetTextEntry(4);
                    string    text4  = (entry4 == null ? "" : entry4.Text.Trim());
                    bool      r4     = Int32.TryParse(text4, out si);
                    if (r4 != false)
                    {
                        dd.LndZ = si;
                    }
                }
            }

            switch (info.ButtonID)
            {
            case 0:
            {
                pm.SendMessage(pm.Name + ", Thanks for using the UO Editor!");

                dd.SendSYSBCK(pm, dd);

                break;
            }

            case 1:
            {
                bool MapCheck = dd.MapCKUOE(pm, dd);

                if (MapCheck == false)
                {
                    pm.SendMessage(pm.Name + ", You entered improper values in the XYZ fields!");

                    dd.SendSYSBCK(pm, dd);

                    if (dd.SndOn == true)
                    {
                        pm.PlaySound(dd.Snd7);
                    }

                    break;
                }

                bool IDCheck = dd.IDCKUOE(pm, dd);

                if (IDCheck == false)
                {
                    pm.SendMessage(pm.Name + ", You entered improper values in the ID field!");

                    dd.SendSYSBCK(pm, dd);

                    if (dd.SndOn == true)
                    {
                        pm.PlaySound(dd.Snd7);
                    }

                    break;
                }

                bool HueCK = dd.HueCKUOE(pm, dd);

                if (HueCK == false)
                {
                    pm.SendMessage(pm.Name + ", You can only enter 1-3000 for the value!");

                    dd.SendSYSBCK(pm, dd);

                    if (dd.SndOn == true)
                    {
                        pm.PlaySound(dd.Snd7);
                    }

                    break;
                }

                if (dd.StcT == true)
                {
                    if (dd.MultiT == true)
                    {
                        CommandSystem.Handle(pm, String.Format("{0}m addStatic {1}", CommandSystem.Prefix, dd.StcID));
                    }
                    if (dd.StcX == 0 || dd.StcY == 0)
                    {
                        CommandSystem.Handle(pm, String.Format("{0}addStatic {1}", CommandSystem.Prefix, dd.StcID));
                    }
                    else
                    {
                        new UltimaLive.AddStatic(pm.Map.MapID, dd.StcID, dd.StcZ, dd.StcX, dd.StcY, dd.Hue_S).DoOperation();
                    }

                    dd.SendSYSBCK(pm, dd);

                    if (dd.SndOn == true)
                    {
                        pm.PlaySound(dd.Snd5);
                    }

                    break;
                }

                if (dd.LndT == true)
                {
                    if (dd.MultiT == true)
                    {
                        CommandSystem.Handle(pm, String.Format("{0}m setLandId {1}", CommandSystem.Prefix, dd.LndID));
                    }
                    if (dd.StcX == 0 || dd.StcY == 0)
                    {
                        CommandSystem.Handle(pm, String.Format("{0}setLandId {1}", CommandSystem.Prefix, dd.LndID));
                    }
                    if (IDCheck == true)
                    {
                        new UltimaLive.SetLandID(dd.LndX, dd.LndY, pm.Map.MapID, dd.LndID).DoOperation();
                        new UltimaLive.SetLandAltitude(dd.LndX, dd.LndY, pm.Map.MapID, dd.LndZ).DoOperation();
                    }

                    dd.SendSYSBCK(pm, dd);

                    if (dd.SndOn == true)
                    {
                        pm.PlaySound(dd.Snd5);
                    }

                    break;
                }

                dd.SendSYSBCK(pm, dd);

                break;
            }
            }
        }