Exemplo n.º 1
0
        public void GetGumpCode(TMQueryPage page)
        {
            sk = page.Skin;
            page.AddTitle("Shard Message Options", "Control");
            //page.AddLabel(75, 90, 192, @"Shard Settings:");
            //page.AddImage(227, 148, 1143);
            SkillSettings.DoTell("GetCoord: " + sk.GetCoord("Control", "X"));
            page.AddLabel(sk.SelectStartX, 115, sk.White, @"Use Shard Info:");
            page.AddCheck(sk.SelectStartX + 100, 115, sk.genericSelectUp, sk.genericSelectDn, SkillSettings.IsSharded, 1000);

            page.AddLabel(sk.SelectStartX, 140, sk.White, @"Not Yours: ");
            page.AddImageTiled(sk.SelectStartX + 100, 140, 332, 20, 3004);
            page.AddTextEntry(sk.SelectStartX + 100, 140, 330, 20, sk.White, 2001, @"" + SkillSettings.NotYoursMessage);

            page.AddLabel(sk.SelectStartX, 170, sk.White, @"How To Use: ");
            page.AddImageTiled(sk.SelectStartX + 100, 170, 332, 20, 3004);
            page.AddTextEntry(sk.SelectStartX + 100, 170, 330, 20, sk.White, 2002, @"" + SkillSettings.HowToUseMessage);

            page.AddLabel(sk.SelectStartX, 200, sk.White, @"No Ticket: ");
            page.AddImageTiled(sk.SelectStartX + 100, 200, 332, 20, 3004);
            page.AddTextEntry(sk.SelectStartX + 100, 200, 330, 20, sk.White, 2003, @"" + SkillSettings.NoTicketMessage);

            page.AddSuperButton(sk.NextButtonSX - page.X, sk.NextButtonSY - 15, sk.NextButtonSH, sk.NextButtonSW, sk.ButtonOverlay, sk.ButtonUnderID, sk.ButtonUnderIDPress, "APPLY", GumpButtonType.Reply, 1, 0);

            //page.AddButton(450, 380, 238, 239, 1, GumpButtonType.Reply, 1);
            //page.AddLabel(335, 380, 0, @"Apply Settings");
        }
Exemplo n.º 2
0
        public void GetGumpCode(TMQueryPage page)
        {
            object o = page.GetValueSet();

            Page          = page;
            this.Dragable = false;
            if (o is TMSkillSession)
            {
                Session = (TMSkillSession)o;
                prof    = Session.Profile;
            }
            Page.BaseSkinByType(this);
            if (prof == null)
            {
                SkillSettings.DoTell("Invalid profile to set up Master."); return;
            }
            TMSS4Skin sk = Session.Skin;

            Page.AddSuperButton(sk.FinishButtonX, sk.FinishButtonY, sk.FinishButtonH, sk.FinishButtonW, sk.ButtonOverlay, sk.ButtonUnderID, sk.ButtonUnderID, sk.FinishLabel, GumpButtonType.Reply, 101, 0, this);
            AddLabel(sk.PointsLabelX, sk.PointsLabelY, sk.Red, sk.PointsLabel + " " + Session.totalSelectedPoints + " / " + Session.totalAllowedPoints);
            AddPage(1);

            IEnumerator ie           = prof.getProfileList();
            int         count        = prof.subProfiles.Count;
            int         i            = 0;
            int         pageid       = 1;
            int         pagesubcount = 0;

            //Add button for stats.
            Page.AddSuperButton(sk.ProfileX, sk.ProfileY + ((i % 6) * (sk.ProfileSpacer + sk.ProfileButtonH)), sk.ProfileButtonH, sk.ProfileButtonW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "Stats", GumpButtonType.Reply, i + 1, 0, this);
            i++;
            pagesubcount++;
            while (ie.MoveNext())
            {
                string blah = ((SkillProfile)((KeyValuePair <string, SkillProfile>)ie.Current).Value).ProfileName;
                SkillSettings.DoTell2("Master gump debug: " + blah);
                Page.AddSuperButton(sk.ProfileX, sk.ProfileY + ((i % 6) * (sk.ProfileSpacer + sk.ProfileButtonH)), sk.ProfileButtonH, sk.ProfileButtonW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "" + blah, GumpButtonType.Reply, i + 1, 0, this);
                i++;
                pagesubcount++;
                if (pagesubcount == 5)
                {
                    pagesubcount = 0;
                }
                if (pagesubcount == 1)
                {
                    Page.AddSuperButton(sk.FinishButtonX, sk.FinishButtonY, sk.FinishButtonH, sk.FinishButtonW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "" + sk.FinishLabel, GumpButtonType.Reply, 101, 0, this);
                }
                if (pagesubcount == 0)
                {
                    pageid++;
                    AddPage(pageid);
                    Page.AddSuperButton(sk.NextButtonMX, sk.NextButtonMY, sk.NextButtonMH, sk.NextButtonMW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "" + sk.NextTextM, GumpButtonType.Page, 0, pageid + 1, this);
                    if (pageid != 1)
                    {
                        Page.AddSuperButton(sk.PrevButtonMX, sk.PrevButtonMY, sk.PrevButtonMH, sk.PrevButtonMW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "" + sk.PrevTextM, GumpButtonType.Page, 0, pageid - 1, this);
                    }
                }
            }
            Session.Mobile.SendGump(this);
        }
Exemplo n.º 3
0
        public void OnResponse(Server.Network.NetState sender, Server.Gumps.RelayInfo info)
        {
            Mobile    from = sender.Mobile;
            TMSS4Skin skin = sk;

            SkillReportsHelper.EnableSelectionReport = info.IsSwitched(2000);
            SkillReportsHelper.EnableProfileReport   = info.IsSwitched(1000);
            //PluginSaver.SavePluginSettings(this);
            Dictionary <string, object> args = new Dictionary <string, object>();

            if (skin != null)
            {
                args.Add("Skin", skin);
            }
            else
            {
                SkillSettings.DoTell("Reports: Skin is null.");
            }
            if (from != null)
            {
                args.Add("Mobile", from);
            }
            else
            {
                SkillSettings.DoTell("Reports: From is null.");
            }
            from.SendGump(new TMQueryPage("Main Menu", args));
        }
Exemplo n.º 4
0
		public static BaseSkin GenerateDefaultSkin(string name)
		{
			TMSS4Skin sk = new TMSS4Skin();
			sk.SkinName = name;
			SkinHelper.WriteSkin(sk);
			SkillSkin skin = new SkillSkin( "Skill Skin" );
			SkinHelper.WriteSkin( skin );
			return sk;
		}
		public TMQueryPage(string argh, TMSkillSession session)
			: base(0, 0)
		{
			arg = argh;
			Mobile = session.Mobile;
			m_sk = session.Skin;
			Session = session;
			Activate();
		}
		public TMQueryPage(string argh, Dictionary<string,object> args)
			: base(((TMSS4Skin)args["Skin"]).GetCoord("Control", "X"), ((TMSS4Skin)args["Skin"]).GetCoord("Control", "Y"))
		{
			arg = argh;
			Mobile = (Mobile)args["Mobile"];
			m_sk = (TMSS4Skin)args["Skin"];
			argDictionary = args;
			Activate();
		}
		public TMQueryPage(string argh, Dictionary<string,object> args, int x, int y)
			: base(x, y)
		{
			arg = argh;
			Mobile = (Mobile)args["Mobile"];
			m_sk = (TMSS4Skin)args["Skin"];
			argDictionary = args;
			Activate();
		}
Exemplo n.º 8
0
 public TMQueryPage(string argh, TMSkillSession session)
     : base(0, 0)
 {
     arg     = argh;
     Mobile  = session.Mobile;
     m_sk    = session.Skin;
     Session = session;
     Activate();
 }
Exemplo n.º 9
0
 public TMQueryPage(string argh, Dictionary <string, object> args, int x, int y)
     : base(x, y)
 {
     arg           = argh;
     Mobile        = (Mobile)args["Mobile"];
     m_sk          = (TMSS4Skin)args["Skin"];
     argDictionary = args;
     Activate();
 }
Exemplo n.º 10
0
 public TMQueryPage(string argh, Dictionary <string, object> args)
     : base(((TMSS4Skin)args["Skin"]).GetCoord("Control", "X"), ((TMSS4Skin)args["Skin"]).GetCoord("Control", "Y"))
 {
     arg           = argh;
     Mobile        = (Mobile)args["Mobile"];
     m_sk          = (TMSS4Skin)args["Skin"];
     argDictionary = args;
     Activate();
 }
Exemplo n.º 11
0
        public static void LMS_OnCommand(CommandEventArgs e)
        {
            string which = "";

            if (e.Arguments.Length > 0)
            {
                try { which = e.Arguments[0]; }
                catch (Exception ex)
                { Console.WriteLine("Invalid arguments. " + ex); }
            }
            if (which != "")
            {
                try { SkinHelper.LoadSkin(which, typeof(TMSS4Skin), true); }
                catch (Exception ex) { Console.WriteLine("Invalid skin name argument: " + ex); }
            }
            else
            {
                try
                {
                    DirectoryInfo di = new DirectoryInfo("TMSS/Data/Skins");
                    foreach (FileInfo f in di.GetFiles())
                    {
                        if (f.Extension == ".tskn")
                        {
                            string skname = f.Name.Remove(f.Name.IndexOf(".tskn"), 5);
                            try
                            {
                                BaseSkin sk = SkinHelper.skList[skname];
                                try
                                {
                                    TMSS4Skin skfour = (TMSS4Skin)sk;
                                    SkinHelper.LoadSkin(skname, typeof(TMSS4Skin), true);
                                }
                                catch
                                {
                                    SkillSkin skskill = (SkillSkin)sk;
                                    SkinHelper.LoadSkin(skname, typeof(SkillSkin), true);
                                }
                                finally
                                {
                                    DoTell("Attempted reload of skin. Filename: " + f.FullName);
                                }
                            }
                            catch
                            { DoTell("Unable to load skin: " + skname + ". Please use the function provided by the creating class to load it."); }
                        }
                    }
                }
                catch (Exception ex)
                {
                    SystemWrite("Error when reloading a skin. " + ex);
                }
            }
            //LoadSkin(SkillSettings.CCSkinName, true);
        }
Exemplo n.º 12
0
        public static BaseSkin GenerateDefaultSkin(string name)
        {
            TMSS4Skin sk = new TMSS4Skin();

            sk.SkinName = name;
            SkinHelper.WriteSkin(sk);
            SkillSkin skin = new SkillSkin("Skill Skin");

            SkinHelper.WriteSkin(skin);
            return(sk);
        }
Exemplo n.º 13
0
        public void GetGumpCode(TMQueryPage page)
        {
            sk = page.Skin;
            page.AddTitle(@"Credits:", "Control");
            page.AddHtml(sk.SelectStartX, 110, 300, 300, "<basefont color=#ffffff>I would like to thank: <br/>4.0 - <br/>(Technical advice)<br/>A_Li_N, TheOutkastDev.<br/>(Testing)<br/>orpheus. <br/>3.0 - A_Li_N, ArteGordon, arul, daat99, Erica, FainneRoisin, orpheus, Phantom, TheOutkastDev.<br/>2.0 - Khaz, Kokushibyou, Phantom.<br/>1.0 - sirenssong, jjarmis.</basefont>", false, false);
            page.AddSuperButton(sk.NextButtonSX - page.X, sk.NextButtonSY - 15, sk.NextButtonSH, sk.NextButtonSW, sk.ButtonOverlay, sk.ButtonUnderID, sk.ButtonUnderIDPress, "OK", GumpButtonType.Reply, 1, 0);
            //page.AddButton(sk.GetCoord("Control", "X", sk ) + 454, 389, 247, 248, 9601, GumpButtonType.Reply, 0);

            page.AddLabel(sk.SelectStartX, 300, 192, @"About:");
            page.AddHtml(sk.SelectStartX, 320, 300, 50, @"<basefont color=#ffffff>Version 4.0.0. This script is licensed as open-source. Enjoy! -TMSTKSBK</basefont>", false, false);
        }
Exemplo n.º 14
0
 public void GetGumpCode(TMQueryPage page)
 {
     sk = page.Skin;
     page.AddLabel(75, 90, 192, @"Report Settings:");
     page.AddLabel(140, 120, 0, @"Enable Profile Reports: ");
     //page.AddCheck(240, 120, sk.CheckboxUn, sk.CheckboxCk, SkillReportsHelper.EnableProfileReport, 1000);
     page.AddLabel(140, 150, 0, @"Enable Selection Reports: ");
     //page.AddCheck(240, 150, sk.CheckboxUn, sk.CheckboxCk, SkillReportsHelper.EnableSelectionReport, 2000);
     page.AddButton(450, 380, 238, 239, 1, GumpButtonType.Reply, 1);
     page.AddLabel(335, 380, 0, @"Apply Settings");
 }
Exemplo n.º 15
0
		public void GetGumpCode(TMQueryPage page)
		{
			sk = page.Skin;
			page.AddLabel(75, 90, 192, @"Report Settings:");
			page.AddLabel(140, 120, 0, @"Enable Profile Reports: ");
			//page.AddCheck(240, 120, sk.CheckboxUn, sk.CheckboxCk, SkillReportsHelper.EnableProfileReport, 1000);
			page.AddLabel(140, 150, 0, @"Enable Selection Reports: ");
			//page.AddCheck(240, 150, sk.CheckboxUn, sk.CheckboxCk, SkillReportsHelper.EnableSelectionReport, 2000);
			page.AddButton(450, 380, 238, 239, 1, GumpButtonType.Reply, 1);
			page.AddLabel(335, 380, 0, @"Apply Settings");
		}
Exemplo n.º 16
0
        public void GetGumpCode(TMQueryPage page)
        {
            sk = page.Skin;
            //page.AddLabel(75, 90, 192, @"Color Options:");
            page.AddTitle("Color Options", "Control");

            page.AddLabel(sk.SelectStartX, 100, sk.White, @"Skill Hue");
            page.AddImageTiled(sk.SelectStartX + 100, 100, 202, 20, 3004);
            page.AddTextEntry(sk.SelectStartX + 102, 100, 200, 20, sk.White, 2000, @"" + SkillSettings.SkillHue);

            page.AddLabel(sk.SelectStartX, 130, sk.White, @"Stat Hue");
            page.AddImageTiled(sk.SelectStartX + 100, 130, 202, 20, 3004);
            page.AddTextEntry(sk.SelectStartX + 102, 130, 200, 20, sk.White, 2002, @"" + SkillSettings.StatHue);

            page.AddLabel(sk.SelectStartX, 250, 32, @"Please use non-hex numbers in these boxes. ");
            page.AddLabel(sk.SelectStartX, 265, 32, @"If you need a hex conversion, use the Windows Calculator.");

            //page.AddButton(450, 380, 238, 239, 1, GumpButtonType.Reply, 1);
            page.AddSuperButton(sk.NextButtonSX - page.X, sk.NextButtonSY - 15, sk.NextButtonSH, sk.NextButtonSW, sk.ButtonOverlay, sk.ButtonUnderID, sk.ButtonUnderIDPress, "APPLY", GumpButtonType.Reply, 1, 0);
            //page.AddLabel(335, 380, 0, @"Apply Settings");
        }
Exemplo n.º 17
0
        public void GetGumpCode(TMQueryPage page)
        {
            Dictionary <string, object> args = (Dictionary <string, object>)page.GetValueSet();

            attemptHelpClose(page);
            page.BaseSkinByType(this);
            if (!args.ContainsKey("Get"))
            {
                return;
            }
            TMSS4Skin sk     = (TMSS4Skin)args["Skin"];
            TMPlugin  plugin = (TMPlugin)args["Get"];
            string    text   = plugin.getHelpText();

            if (sk.IconHOn)
            {
                this.AddImage(sk.IconHX, sk.IconHY, sk.IconHID);
            }
            this.AddHtml(sk.HelpLabelX, sk.HelpLabelY, sk.HelpLabelW, sk.HelpLabelH, "<basefont size=4 face=2 color=#ffffff>" + text + "</basefont>", false, false);
            page.Mobile.SendGump(this);
        }
Exemplo n.º 18
0
        public void GetGumpCode(TMQueryPage page)
        {
            sk = page.Skin;
            //page.AddLabel(75, 90, 192, @"Gump Settings:");
            page.AddTitle("Gump Settings", "Control");
            //AccessLevel
            page.AddLabel(sk.SelectStartX, 115, sk.White, @"Gump Access Level:");
            //int which = (int)Server.AccessLevels(SkillSettings.GumpControlLevel);
            //page.AddTextEntry(200, 232, 200, 20, 0, 2000, @""+SkillSettings.GumpControlLevel);
            page.AddLabel(sk.SelectStartX, 135, sk.White, @"Administrator:");
            page.AddRadio(sk.SelectStartX + 100, 135, 208, 209, SkillSettings.GumpControlLevel == AccessLevel.Administrator ? true : false, 200);   //admin
            page.AddLabel(sk.SelectStartX, 160, sk.White, @"Seer:");
            page.AddRadio(sk.SelectStartX + 100, 160, 208, 209, SkillSettings.GumpControlLevel == AccessLevel.Seer ? true : false, 201);            //seer
            page.AddLabel(sk.SelectStartX, 185, sk.White, @"Game Master:");
            page.AddRadio(sk.SelectStartX + 100, 185, 208, 209, SkillSettings.GumpControlLevel == AccessLevel.GameMaster ? true : false, 202);      //GM
            page.AddLabel(sk.SelectStartX, 210, sk.White, @"Counselor:");
            page.AddRadio(sk.SelectStartX + 100, 210, 208, 209, SkillSettings.GumpControlLevel == AccessLevel.Counselor ? true : false, 203);       //counselor

            //page.AddButton(450, 380, 238, 239, 1, GumpButtonType.Reply, 1);
            //page.AddLabel(335, 380, 0, @"Apply Settings");
            page.AddSuperButton(sk.NextButtonSX - page.X, sk.NextButtonSY - 15, sk.NextButtonSH, sk.NextButtonSW, sk.ButtonOverlay, sk.ButtonUnderID, sk.ButtonUnderIDPress, "APPLY", GumpButtonType.Reply, 1, 0);
        }
Exemplo n.º 19
0
		public TMSkillSession(Mobile m, BaseTMSkillItem item)
		{
			int points = 0;
			try
			{
				string name = item.Profile.ProfileName;				
				if (SkillProfileHelper.Profiles.ContainsKey(name))
				{
					points = SkillProfileHelper.Profiles[name].SkillPoints;
					SkillSettings.DoTell("Profile Direct Query - Points: "+points+" for " +name );
				}
				else
					SkillSettings.DoTell("Name "+name+" not present in Profiles.");
			}
			catch (Exception e ){ 
				SkillSettings.DoTell("Exception while getting profile by item's profile name. "+e);
			}
			if (item.Profile == null)
			{ SkillSettings.DoTell("Invalid Profile value. It will be reset to the default."); }
			if (item.Skin == null)
			{ SkillSettings.DoTell("Invalid Skin value. It will be reset to the default."); }

			m_Item = item;
			m_Mobile = m;

			if (item.Profile == null && SkillProfileHelper.Supers[SkillSettings.CCProfileName] != null)
				Profile = SkillProfileHelper.Supers[SkillSettings.CCProfileName];
			else if (SkillProfileHelper.Supers[SkillSettings.CCProfileName] == null)
			{ SkillSettings.DoTell("Invalid Profile cannot be remedied." ); invalidated = true; return; }
			else
				Profile = (SuperSkillProfile)item.Profile;

			if (m_Item.Points > 0)
				totalAllowedPoints = m_Item.Points;
			else
			{
				SkillSettings.DoTell("Item's points are <= 0, Profile " + Profile.ProfileName + "'s SkillPoints value: " + points + " will be used."); 
				totalAllowedPoints = points; }
			if (totalAllowedPoints <= 0)
			{ SkillSettings.DoTell("Invalid Points value. Cannot continue session."); invalidated = true; }

			if (item.Skin == "" || item.Skin == null)
				Skin = (TMSS4Skin)SkinHelper.getSkin(SkillSettings.CCSkinName);
			else
			{
				try
				{
					Skin = (TMSS4Skin)SkinHelper.getSkin(item.Skin);
				}
				catch
				{
					Skin = (TMSS4Skin)SkinHelper.getSkin(SkillSettings.CCSkinName);
				}
			}

		}
Exemplo n.º 20
0
        public void GetGumpCode(TMQueryPage page)
        {
            Page = page;
            SkillSettings.DoTell("GetGumpCode, Skill Gump.");
            if (Profile == null)
            {
                try
                {
                    Dictionary <string, object> h = (Dictionary <string, object>)Page.GetValueSet();
                    Profile = (SkillProfile)h["Profile"];
                    Skin    = (TMSS4Skin)h["Skin"];
                    Session = (TMSkillSession)h["Session"];
                }
                catch (Exception e)
                {
                    SkillSettings.DoTell("Error when generating skill gump: " + e);
                    return;
                }
            }
            if (Profile == null)
            {
                SkillSettings.DoTell("Profile is still null. Cannot continue."); return;
            }
            if (!Profile.SkillEnable)
            {
                SkillSettings.DoTell("Skills not enabled on this profile.");
                return;
            }
            this.Dragable = false;
            Page.BaseSkinByType(this);
            Page.AddTitle("Skill Gump for " + Profile.ProfileName + ": ", "Control", this);
            if (Profile.IconID > 0)
            {
                SkillSettings.DoTell("Adding Icon: " + Profile.IconID);
                Page.AddIcon(Profile.IconID, "Control", this);
            }
            this.AddLabel(35, Skin.GetCoord("Control", "H") - 40, Skin.HighlightText, "Profile Maximum: " + Profile.SkillPoints + " pts");
            ButtonInfo inf2 = Skin.ButtonInfo["SessionAddButton"];

            SkillSettings.DoTell("Inf2: X: " + inf2.X + " Y: " + inf2.Y + " W: " + inf2.W + " H: " + inf2.H + " BG: " + inf2.bgID + " TX: " + inf2.text);
            Page.AddSuperButton(inf2.X, Page.Y + inf2.Y, inf2.H, inf2.W, inf2.bgID, Skin.ListUnderButtonN, Skin.ListUnderButtonP, Skin.AddLabel, GumpButtonType.Reply, 1, 0, this);
            IEnumerator ie = Profile.MasterHash.GetEnumerator();
            GumpList    l  = new GumpList(this, "details", this.Skin);

            l.numperpage = 8;
            l.AddColumn("Skill Name");
            l.AddColumn("Skill Value");
            l.AddColumn("Weight");
            l.AddColumn("Select");
            l.SetColumnCount(4);
            l.ChangeColumnWidth(0, 200);
            l.X            = Skin.SelectStartX;
            l.Y            = Skin.SelectStartY;
            l.ShowDividers = true;
            int colcount = 3;             // at least columns for title, value, and checkbox.

            if (Profile.CapEnable)
            {
                colcount++;
            }
            if (Profile.WeightEnable)
            {
                colcount++;
            }
            l.SetColumnCount(colcount);
            int checkID = 0;

            if (!Profile.Manual)
            {
                checkID = 1000;
            }
            else
            {
                checkID = 3000;
            }
            Dictionary <string, TMUsedInfo> selitem = Session.HasSelectedItems(Profile.ProfileName);

            SkillSettings.DoTell(" Selitem debug: " + selitem.Count + " Profile: " + Profile.ProfileName + " TSP: " + Session.totalSelectedPoints);
            IEnumerator selitemie = selitem.GetEnumerator();

            while (selitemie.MoveNext())
            {
                SkillSettings.DoTell(" - " + ((KeyValuePair <string, TMUsedInfo>)selitemie.Current).Value.SkillName + " Value: " + ((KeyValuePair <string, TMUsedInfo>)selitemie.Current).Value.SkillValue);
            }
            while (ie.MoveNext())
            {
                TMSkillInfo inf = (TMSkillInfo)((KeyValuePair <string, TMSkillInfo>)ie.Current).Value;

                /*
                 * if (y % sk.NumPerPage == 0)
                 * {Page.SetupPage(thisProfile.ProfileName, y == 0, thisProfile.MasterHash.Count - y < sk.NumPerPage ? true : false, page); page++;}
                 * Page.AddEntryCheck( 0, y%sk.NumPerPage, sk.SelectUp, sk.SelectDn, false, (1000 * page) + (y % sk.NumPerPage), ""+inf.SkillName, ""+inf.SkillWeight, ""+inf.SkillValue );
                 * y++;*/
                GumpListEntry e = new GumpListEntry(0, 0, l, Skin.EntryDefaultWidth, Skin.EntryDefaultHeight);

                e.AddColumn(inf.SkillName);
                e.AddColumn("" + inf.SkillValue);
                if (Profile.CapEnable)
                {
                    e.AddColumn("" + inf.SkillCap);
                }
                if (Profile.WeightEnable)
                {
                    e.AddColumn("" + inf.SkillWeight);
                }
                if (!Profile.Manual)
                {
                    e.AddColumn(new GumpCheck(-2, 0, Skin.EntryDefaultCheckUp, Skin.EntryDefaultCheckDn, selitem.ContainsKey(inf.SkillName), checkID));
                }
                else
                {
                    e.AddColumn(new GumpTextEntry(0, 0, 30, Skin.EntryDefaultHeight, Skin.NormalText, checkID, ""));
                }

                checkID++;
                l.Add(e);
            }
            l.CommitList();
            Session.Mobile.SendGump(this);
        }
Exemplo n.º 21
0
		public void GetGumpCode(TMQueryPage page)
		{
			Page = page;
			SkillSettings.DoTell("GetGumpCode, Skill Gump.");
			if (Profile == null)
			{
				try
				{
					Dictionary<string, object> h = (Dictionary<string, object>)Page.GetValueSet();
					Profile = (SkillProfile)h["Profile"];
					Skin = (TMSS4Skin)h["Skin"];
					Session = (TMSkillSession)h["Session"];
				}
				catch (Exception e)
				{
					SkillSettings.DoTell("Error when generating skill gump: " + e);
					return;
				}
			}
			if (Profile == null)
			{ SkillSettings.DoTell("Profile is still null. Cannot continue."); return; }
			if( !Profile.SkillEnable )
			{
				SkillSettings.DoTell("Skills not enabled on this profile.");
				return;
			}
			this.Dragable = false;
			Page.BaseSkinByType(this);
			Page.AddTitle( "Skill Gump for "+Profile.ProfileName+": ", "Control",this);
			if (Profile.IconID > 0)
			{ 
				SkillSettings.DoTell("Adding Icon: "+Profile.IconID);
				Page.AddIcon(Profile.IconID, "Control", this); 
			}
			this.AddLabel(35, Skin.GetCoord("Control", "H") - 40, Skin.HighlightText, "Profile Maximum: " + Profile.SkillPoints + " pts");
			ButtonInfo inf2 = Skin.ButtonInfo["SessionAddButton"];
			SkillSettings.DoTell("Inf2: X: "+inf2.X+" Y: "+inf2.Y+" W: "+inf2.W+" H: " +inf2.H+" BG: "+inf2.bgID+ " TX: "+inf2.text);
			Page.AddSuperButton(inf2.X, Page.Y+inf2.Y, inf2.H, inf2.W, inf2.bgID, Skin.ListUnderButtonN, Skin.ListUnderButtonP, Skin.AddLabel, GumpButtonType.Reply, 1, 0,this);
			IEnumerator ie = Profile.MasterHash.GetEnumerator();
			GumpList l = new GumpList(this, "details", this.Skin);
			l.numperpage=8;
			l.AddColumn("Skill Name");
			l.AddColumn("Skill Value");
			l.AddColumn("Weight");
			l.AddColumn("Select");
			l.SetColumnCount(4);
			l.ChangeColumnWidth(0, 200);
			l.X = Skin.SelectStartX;
			l.Y = Skin.SelectStartY;
			l.ShowDividers = true;
			int colcount = 3; // at least columns for title, value, and checkbox.
			if (Profile.CapEnable)
				colcount++;
			if (Profile.WeightEnable)
				colcount++;
			l.SetColumnCount(colcount);
			int checkID = 0;
			if (!Profile.Manual)
				checkID = 1000;
			else
				checkID = 3000;
			Dictionary<string,TMUsedInfo> selitem = Session.HasSelectedItems( Profile.ProfileName );
			SkillSettings.DoTell(" Selitem debug: "+selitem.Count+" Profile: "+Profile.ProfileName+" TSP: "+Session.totalSelectedPoints);
			IEnumerator selitemie = selitem.GetEnumerator();
			while (selitemie.MoveNext())
			{
				SkillSettings.DoTell(" - " + ((KeyValuePair<string, TMUsedInfo>)selitemie.Current).Value.SkillName + " Value: " + ((KeyValuePair<string, TMUsedInfo>)selitemie.Current).Value.SkillValue);
			}
			while (ie.MoveNext())
			{
				TMSkillInfo inf = (TMSkillInfo)((KeyValuePair<string,TMSkillInfo>)ie.Current).Value;
				/*
				if (y % sk.NumPerPage == 0)
				{Page.SetupPage(thisProfile.ProfileName, y == 0, thisProfile.MasterHash.Count - y < sk.NumPerPage ? true : false, page); page++;}
				Page.AddEntryCheck( 0, y%sk.NumPerPage, sk.SelectUp, sk.SelectDn, false, (1000 * page) + (y % sk.NumPerPage), ""+inf.SkillName, ""+inf.SkillWeight, ""+inf.SkillValue );
				y++;*/
				GumpListEntry e = new GumpListEntry(0, 0, l, Skin.EntryDefaultWidth, Skin.EntryDefaultHeight);

				e.AddColumn(inf.SkillName);
				e.AddColumn("" + inf.SkillValue);
				if (Profile.CapEnable)
					e.AddColumn("" + inf.SkillCap);
				if (Profile.WeightEnable)
					e.AddColumn("" + inf.SkillWeight);
				if (!Profile.Manual)
					e.AddColumn(new GumpCheck(-2, 0, Skin.EntryDefaultCheckUp, Skin.EntryDefaultCheckDn, selitem.ContainsKey(inf.SkillName), checkID));
				else
					e.AddColumn(new GumpTextEntry(0, 0, 30, Skin.EntryDefaultHeight, Skin.NormalText, checkID, ""));

				checkID++;
				l.Add(e);
			}
			l.CommitList();	
			Session.Mobile.SendGump(this);
		}
Exemplo n.º 22
0
 public MainTMSSMenu()
 {
     sk = (TMSS4Skin)SkinHelper.getSkin(SkillSettings.CCSkinName);
 }
Exemplo n.º 23
0
        public static void GDS_OnCommand(CommandEventArgs e)
        {
            TMSS4Skin sk = new TMSS4Skin();

            SkinHelper.WriteSkin(sk);
        }
Exemplo n.º 24
0
		public void GetGumpCode(TMQueryPage page)
		{
			sk = page.Skin;
			//page.AddLabel(75, 90, 192, @"Color Options:");
			page.AddTitle("Color Options", "Control");

			page.AddLabel(sk.SelectStartX, 100, sk.White, @"Skill Hue");
			page.AddImageTiled(sk.SelectStartX + 100, 100, 202, 20, 3004);
			page.AddTextEntry(sk.SelectStartX + 102, 100, 200, 20, sk.White, 2000, @"" + SkillSettings.SkillHue);

			page.AddLabel(sk.SelectStartX, 130, sk.White, @"Stat Hue");
			page.AddImageTiled(sk.SelectStartX + 100, 130, 202, 20, 3004);
			page.AddTextEntry(sk.SelectStartX + 102, 130, 200, 20, sk.White, 2002, @"" + SkillSettings.StatHue);

			page.AddLabel(sk.SelectStartX, 250, 32, @"Please use non-hex numbers in these boxes. ");
			page.AddLabel(sk.SelectStartX, 265, 32, @"If you need a hex conversion, use the Windows Calculator.");

			//page.AddButton(450, 380, 238, 239, 1, GumpButtonType.Reply, 1);
			page.AddSuperButton(sk.NextButtonSX - page.X, sk.NextButtonSY - 15, sk.NextButtonSH, sk.NextButtonSW, sk.ButtonOverlay, sk.ButtonUnderID, sk.ButtonUnderIDPress, "APPLY", GumpButtonType.Reply, 1, 0);
			//page.AddLabel(335, 380, 0, @"Apply Settings");
		}
Exemplo n.º 25
0
		public void GetGumpCode(TMQueryPage page)
		{
			sk = page.Skin;
			page.AddTitle("Shard Message Options", "Control");
			//page.AddLabel(75, 90, 192, @"Shard Settings:");
			//page.AddImage(227, 148, 1143);
			SkillSettings.DoTell("GetCoord: " + sk.GetCoord("Control", "X"));
			page.AddLabel(sk.SelectStartX, 115, sk.White, @"Use Shard Info:");
			page.AddCheck(sk.SelectStartX + 100, 115, sk.genericSelectUp, sk.genericSelectDn, SkillSettings.IsSharded, 1000);

			page.AddLabel(sk.SelectStartX, 140, sk.White, @"Not Yours: ");
			page.AddImageTiled(sk.SelectStartX + 100, 140, 332, 20, 3004);
			page.AddTextEntry(sk.SelectStartX + 100, 140, 330, 20, sk.White, 2001, @"" + SkillSettings.NotYoursMessage);

			page.AddLabel(sk.SelectStartX, 170, sk.White, @"How To Use: ");
			page.AddImageTiled(sk.SelectStartX + 100, 170, 332, 20, 3004);
			page.AddTextEntry(sk.SelectStartX + 100, 170, 330, 20, sk.White, 2002, @"" + SkillSettings.HowToUseMessage);

			page.AddLabel(sk.SelectStartX, 200, sk.White, @"No Ticket: ");
			page.AddImageTiled(sk.SelectStartX + 100, 200, 332, 20, 3004);
			page.AddTextEntry(sk.SelectStartX + 100, 200, 330, 20, sk.White, 2003, @"" + SkillSettings.NoTicketMessage);

			page.AddSuperButton(sk.NextButtonSX - page.X, sk.NextButtonSY - 15, sk.NextButtonSH, sk.NextButtonSW, sk.ButtonOverlay, sk.ButtonUnderID, sk.ButtonUnderIDPress, "APPLY", GumpButtonType.Reply, 1, 0);

			//page.AddButton(450, 380, 238, 239, 1, GumpButtonType.Reply, 1);
			//page.AddLabel(335, 380, 0, @"Apply Settings");
		}
Exemplo n.º 26
0
		public void GetGumpCode(TMQueryPage page)
		{
			sk = page.Skin;
			//page.AddLabel(75, 90, 192, @"Gump Settings:");
			page.AddTitle("Gump Settings", "Control");
			//AccessLevel
			page.AddLabel(sk.SelectStartX, 115, sk.White, @"Gump Access Level:");
			//int which = (int)Server.AccessLevels(SkillSettings.GumpControlLevel);
			//page.AddTextEntry(200, 232, 200, 20, 0, 2000, @""+SkillSettings.GumpControlLevel);
			page.AddLabel(sk.SelectStartX, 135, sk.White, @"Administrator:");
			page.AddRadio(sk.SelectStartX + 100, 135, 208, 209, SkillSettings.GumpControlLevel == AccessLevel.Administrator ? true : false, 200);//admin
			page.AddLabel(sk.SelectStartX, 160, sk.White, @"Seer:");
			page.AddRadio(sk.SelectStartX + 100, 160, 208, 209, SkillSettings.GumpControlLevel == AccessLevel.Seer ? true : false, 201);//seer
			page.AddLabel(sk.SelectStartX, 185, sk.White, @"Game Master:");
			page.AddRadio(sk.SelectStartX + 100, 185, 208, 209, SkillSettings.GumpControlLevel == AccessLevel.GameMaster ? true : false, 202);//GM
			page.AddLabel(sk.SelectStartX, 210, sk.White, @"Counselor:");
			page.AddRadio(sk.SelectStartX + 100, 210, 208, 209, SkillSettings.GumpControlLevel == AccessLevel.Counselor ? true : false, 203);//counselor

			//page.AddButton(450, 380, 238, 239, 1, GumpButtonType.Reply, 1);
			//page.AddLabel(335, 380, 0, @"Apply Settings");
			page.AddSuperButton(sk.NextButtonSX - page.X, sk.NextButtonSY - 15, sk.NextButtonSH, sk.NextButtonSW, sk.ButtonOverlay, sk.ButtonUnderID, sk.ButtonUnderIDPress, "APPLY", GumpButtonType.Reply, 1, 0);
		}
Exemplo n.º 27
0
		public void GetGumpCode(TMQueryPage page)
		{
			sk = page.Skin;
			page.AddTitle(@"Credits:", "Control");
			page.AddHtml(sk.SelectStartX, 110, 300, 300, "<basefont color=#ffffff>I would like to thank: <br/>4.0 - <br/>(Technical advice)<br/>A_Li_N, TheOutkastDev.<br/>(Testing)<br/>orpheus. <br/>3.0 - A_Li_N, ArteGordon, arul, daat99, Erica, FainneRoisin, orpheus, Phantom, TheOutkastDev.<br/>2.0 - Khaz, Kokushibyou, Phantom.<br/>1.0 - sirenssong, jjarmis.</basefont>", false, false);
			page.AddSuperButton(sk.NextButtonSX - page.X, sk.NextButtonSY - 15, sk.NextButtonSH, sk.NextButtonSW, sk.ButtonOverlay, sk.ButtonUnderID, sk.ButtonUnderIDPress, "OK", GumpButtonType.Reply, 1, 0);
			//page.AddButton(sk.GetCoord("Control", "X", sk ) + 454, 389, 247, 248, 9601, GumpButtonType.Reply, 0);

			page.AddLabel(sk.SelectStartX, 300, 192, @"About:");
			page.AddHtml(sk.SelectStartX, 320, 300, 50, @"<basefont color=#ffffff>Version 4.0.0. This script is licensed as open-source. Enjoy! -TMSTKSBK</basefont>", false, false);
		}
Exemplo n.º 28
0
		public MainTMSSMenu() { sk = (TMSS4Skin)SkinHelper.getSkin(SkillSettings.CCSkinName); }
Exemplo n.º 29
0
        public TMSkillSession(Mobile m, BaseTMSkillItem item)
        {
            int points = 0;

            try
            {
                string name = item.Profile.ProfileName;
                if (SkillProfileHelper.Profiles.ContainsKey(name))
                {
                    points = SkillProfileHelper.Profiles[name].SkillPoints;
                    SkillSettings.DoTell("Profile Direct Query - Points: " + points + " for " + name);
                }
                else
                {
                    SkillSettings.DoTell("Name " + name + " not present in Profiles.");
                }
            }
            catch (Exception e) {
                SkillSettings.DoTell("Exception while getting profile by item's profile name. " + e);
            }
            if (item.Profile == null)
            {
                SkillSettings.DoTell("Invalid Profile value. It will be reset to the default.");
            }
            if (item.Skin == null)
            {
                SkillSettings.DoTell("Invalid Skin value. It will be reset to the default.");
            }

            m_Item   = item;
            m_Mobile = m;

            if (item.Profile == null && SkillProfileHelper.Supers[SkillSettings.CCProfileName] != null)
            {
                Profile = SkillProfileHelper.Supers[SkillSettings.CCProfileName];
            }
            else if (SkillProfileHelper.Supers[SkillSettings.CCProfileName] == null)
            {
                SkillSettings.DoTell("Invalid Profile cannot be remedied."); invalidated = true; return;
            }
            else
            {
                Profile = (SuperSkillProfile)item.Profile;
            }

            if (m_Item.Points > 0)
            {
                totalAllowedPoints = m_Item.Points;
            }
            else
            {
                SkillSettings.DoTell("Item's points are <= 0, Profile " + Profile.ProfileName + "'s SkillPoints value: " + points + " will be used.");
                totalAllowedPoints = points;
            }
            if (totalAllowedPoints <= 0)
            {
                SkillSettings.DoTell("Invalid Points value. Cannot continue session."); invalidated = true;
            }

            if (item.Skin == "" || item.Skin == null)
            {
                Skin = (TMSS4Skin)SkinHelper.getSkin(SkillSettings.CCSkinName);
            }
            else
            {
                try
                {
                    Skin = (TMSS4Skin)SkinHelper.getSkin(item.Skin);
                }
                catch
                {
                    Skin = (TMSS4Skin)SkinHelper.getSkin(SkillSettings.CCSkinName);
                }
            }
        }
Exemplo n.º 30
0
		public static void GDS_OnCommand(CommandEventArgs e)
		{
			TMSS4Skin sk = new TMSS4Skin();
			SkinHelper.WriteSkin( sk );
		}