Esempio 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");
        }
Esempio 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);
        }
Esempio n. 3
0
        public void GetGumpCode(TMQueryPage page)
        {
            page.BaseSkinByType(this);
            int      i  = 0;
            GumpList gl = new GumpList(this, "details", page.Skin);

            gl.X = page.Skin.SelectStartX;
            gl.Y = page.Skin.SelectStartY;
            gl.AddColumn("Skins Available");

            gl.SetColumnCount(2);
            gl.columnWidths[0] = page.Skin.ListWidth - 100;
            gl.columnWidths[1] = 100;

            while (i < skinnames.Count)
            {
                if (SkinHelper.skList[skinnames[i]] is TMSS4Skin)
                {
                    GumpListEntry gle = new GumpListEntry(0, 0, gl, 250, 20);
                    gle.AddColumn("Set " + skinnames[i] + " on item");
                    gle.AddColumn(new GumpButton(0, 0, page.Skin.SelectDn, page.Skin.SelectUp, i + 1, GumpButtonType.Reply, 0));
                    GumpListEntry gl2 = new GumpListEntry(0, 0, gl, 250, 20);
                    gl2.AddColumn("Set " + skinnames[i] + " as default");
                    gl2.AddColumn(new GumpButton(0, 0, page.Skin.SelectDn, page.Skin.SelectUp, (i + 1) * -1, GumpButtonType.Reply, 0));
                    gl.Add(gle);
                    gl.Add(gl2);
                }
                i++;
            }
            gl.CommitList();

            page.Mobile.SendGump(this);
        }
Esempio n. 4
0
 public void Start()
 {
     if (invalidated)
     {
         return;
     }
     if (m_Mobile == null || m_Item == null || Profile == null || Skin == null)
     {
         SkillSettings.DoTell("One or more necessary items are null, the session cannot continue."); return;
     }
     if (Profile.IsGumped)
     {
         WindowInfo masterinf = Skin.WindowInfo["Master"];
         subMaster = new TMQueryPage("TMSS Session Master Gump", this);
         //m_Mobile.SendGump( subMaster );
         //Mobile.SendGump( new TMQueryPage("TMSS Stat Gump", this ) );
         TMQueryPage tqp = new TMQueryPage("TMSS Stat Gump", this);
     }
     else if (Profile.StandTicket)
     {
         QuickMethod();
     }
     else
     {
         SkillSettings.DoTell("Unable to continue. Invalid session configuration.");
     }
 }
Esempio n. 5
0
        public void GetGumpCode(TMQueryPage page)
        {
            page.BaseSkinByType(this);
            int      i  = 0;
            GumpList gl = new GumpList(this, "details", page.Skin);

            gl.X = page.Skin.SelectStartX;
            gl.Y = page.Skin.SelectStartY;
            gl.AddColumn("Super Profiles Available");
            gl.AddColumn("Item Profile Setter");
            gl.AddColumn("Set As Default");
            gl.columns = 3;

            while (i < profilenames.Count)
            {
                GumpListEntry gle = new GumpListEntry(0, 0, gl, 250, 20);
                gle.AddColumn("Set " + profilenames[i] + " on an item");
                gle.AddColumn(new GumpButton(0, 0, page.Skin.SelectDn, page.Skin.SelectUp, i + 1, GumpButtonType.Reply, 0));
                //gle.AddColumn(new GumpButton(0, 0, page.Skin.SelectDn, page.Skin.SelectUp, (i + 1)*-1, GumpButtonType.Reply, 0));
                GumpListEntry gl2 = new GumpListEntry(0, 0, gl, 250, 20);
                gl2.AddColumn("Set " + profilenames[i] + " as default");
                gl2.AddColumn(new GumpButton(0, 0, page.Skin.SelectDn, page.Skin.SelectUp, (i + 1) * -1, GumpButtonType.Reply, 0));
                gl.Add(gle);
                gl.Add(gl2);
                i++;
            }
            gl.CommitList();


            page.Mobile.SendGump(this);
        }
Esempio n. 6
0
 public static void MasterTest_OnCommand(CommandEventArgs e)
 {
     if (QueryPageHelper.PluginExists("TMMaster"))
     {
         TMSkillSession s    = SessionGenerate(e);
         TMQueryPage    page = new TMQueryPage("TMSS Session Master Gump", s);
         //e.Mobile.SendGump( page );
     }
 }
		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");
		}
Esempio n. 8
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");
 }
Esempio n. 9
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);
        }
Esempio n. 10
0
 private void Activate()
 {
     this.AddPage(1);
     //The heart of the matter. If a plugin is enabled...
     try
     {
         if ((bool)QueryPageHelper.PluginsEnabled[arg])
         {
             //Try to connect to the plugin's gump code repository.
             try
             {
                 string toAct = "Server.TMSS." + (string)QueryPageHelper.GumpCalls[arg];                        //+"."+ControlPageHelper.GumpCalls[num]+"()";
                 //SkillSettings.doTell( toAct );
                 ObjectHandle handle = Activator.CreateInstance(null, toAct);
                 TMPlugin     theObj = (TMPlugin)handle.Unwrap();
                 relplug  = theObj;
                 GumpType = relplug.getGumpType();
                 if (GumpType != "Underbar" && GumpType != "Master" && Mobile != null && Skin.HelpOn)
                 {
                     Dictionary <string, object> args = new Dictionary <string, object>();
                     args.Add("Skin", this.Skin);
                     args.Add("Mobile", Mobile);
                     args.Add("Get", relplug);
                     associatedHelpGump = new TMQueryPage("TMSS Session Help Gump", args);
                     //Mobile.SendGump(associatedHelpGump);
                 }
                 if (!(relplug is Gump))
                 {
                     BaseSkinByType(this);
                 }
                 theObj.GetGumpCode(this);
             }
             //If you can't, throw this exception.
             catch (Exception e)
             {
                 SkillSettings.DoTell("Plugin errors on use. Please report this error, and do not attempt to use: " + arg + " Exception: " + e);
             }
         }
         //If the plugin is NOT enabled...
         else
         {
             SkillSettings.DoTell("Plugin not enabled: " + arg);
         }
     }
     catch (Exception e)
     {
         SkillSettings.DoTell("Error while creating plugin info. Arg was: " + arg + ". Further info: " + e);
     }
 }
Esempio n. 11
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);
		}
Esempio n. 12
0
 public static void SkinSelect_OnCommand(CommandEventArgs e)
 {
     if (QueryPageHelper.PluginExists("TMSkinPage"))
     {
         SkillSettings.DoTell("Inside existing section.");
         Dictionary <string, object> args = new Dictionary <string, object>();
         args.Add("Skin", SkinHelper.getSkin(SkillSettings.CCSkinName));
         args.Add("Mobile", e.Mobile);
         TMQueryPage page = new TMQueryPage("TMSS Skin Selector", args);
         //e.Mobile.SendGump( page );
         SkillSettings.DoTell("Gump sent.");
     }
     else
     {
         SkillSettings.DoTell("Plugin does not exist.");
     }
 }
Esempio n. 13
0
        public void GetGumpCode(TMQueryPage page)
        {
            //page.AddTitle(@"Main Menu:", "Control");
            page.AddIcon(2245, "Control");
            IEnumerator enu = QueryPageHelper.GumpNames.GetEnumerator();            //list.GetEnumerator();
            //IEnumerator enu = enu1.GetEnumerator();
            ArrayList sortList = new ArrayList();

            while (enu.MoveNext())
            {
                string current = (string)((KeyValuePair <string, string>)enu.Current).Value;
                sortList.Add(current);
            }
            sortList.Sort(new AlphaCompare());
            enu = sortList.GetEnumerator();
            int pageNum = 0;
            int i       = 0;

            while (enu.MoveNext())
            {
                SkillSettings.DoTell2("" + enu.Current);
                string current = (string)enu.Current;
                if (current != "Main Menu" && !current.Contains("TMSS")) //Removes the Main Menu and the SkillStat gumps from the list.
                {
                    if (i % 8 == 0)                                      //if it's at 10, stop. Counts 1-10. (Same as 0-9)
                    {
                        pageNum++;
                        page.AddPage(pageNum);
                        page.SetupPage(@"Main Menu: ", (i == 0), (sortList.Count - (pageNum * 10)) <= 8 ? true : false, pageNum);
                    }
                    //string pluginName = (string)QueryPageHelper.GumpCalls[current];
                    int pluginID = -1;
                    try
                    {
                        pluginID = (int)QueryPageHelper.GumpIDs[current] + 1;
                    }
                    catch (Exception e) { SkillSettings.DoTell("BLAH! " + e); }
                    SkillSettings.DoTell2("Current Plugin: " + current);
                    page.AddEntryButton(0, i, sk.genericSelectUp, sk.genericSelectDn, pluginID, GumpButtonType.Reply, 0, current, "", "");
                    i++;
                }
            }
        }
Esempio n. 14
0
 public static void SkillTest_OnCommand(CommandEventArgs e)
 {
     //ListTestGump g = new ListTestGump();
     if (QueryPageHelper.PluginExists("TMSkill"))
     {
         Dictionary <string, object> t = new Dictionary <string, object>();
         t.Add("Skin", SkinHelper.getSkin(SkillSettings.ControlSkinName));
         t.Add("Mobile", e.Mobile);
         SuperSkillProfile p  = (SuperSkillProfile)SkillProfileHelper.getProfile("Default Profile");
         SkillProfile      sp = p.getProfile(0);
         t.Add("Profile", sp);
         TMQueryPage pg = new TMQueryPage("TMSS Skill Gump", t);
         //e.Mobile.SendGump(pg);
     }
     else
     {
         DoTell("Error when creating Skill Gump. Plugin does not exist.");
         return;
     }
 }
Esempio n. 15
0
		public void GetGumpCode(TMQueryPage page)
		{
			//page.AddTitle(@"Main Menu:", "Control");
			page.AddIcon(2245, "Control");
			IEnumerator enu = QueryPageHelper.GumpNames.GetEnumerator();//list.GetEnumerator();
			//IEnumerator enu = enu1.GetEnumerator();
			ArrayList sortList = new ArrayList();
			while (enu.MoveNext())
			{
				string current = (string)((KeyValuePair<string, string>)enu.Current).Value;
				sortList.Add(current);
			}
			sortList.Sort(new AlphaCompare());
			enu = sortList.GetEnumerator();
			int pageNum = 0;
			int i = 0;
			while (enu.MoveNext())
			{
				SkillSettings.DoTell2("" + enu.Current);
				string current = (string)enu.Current;
				if (current != "Main Menu" && !current.Contains("TMSS"))//Removes the Main Menu and the SkillStat gumps from the list.
				{
					if (i % 8 == 0) //if it's at 10, stop. Counts 1-10. (Same as 0-9)
					{
						pageNum++;
						page.AddPage(pageNum);
						page.SetupPage(@"Main Menu: ", (i == 0), (sortList.Count - (pageNum * 10)) <= 8 ? true : false, pageNum);
					}
					//string pluginName = (string)QueryPageHelper.GumpCalls[current];
					int pluginID = -1;
					try
					{
						pluginID = (int)QueryPageHelper.GumpIDs[current] + 1;
					}
					catch (Exception e) { SkillSettings.DoTell("BLAH! " + e); }
					SkillSettings.DoTell2("Current Plugin: " + current);
					page.AddEntryButton(0, i, sk.genericSelectUp, sk.genericSelectDn, pluginID, GumpButtonType.Reply, 0, current, "", "");
					i++;
				}
			}
		}
Esempio n. 16
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);
        }
Esempio n. 17
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");
        }
Esempio 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);
        }
Esempio n. 19
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");
		}
Esempio n. 20
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);
		}
Esempio n. 21
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);
		}
Esempio n. 22
0
		internal void attemptHelpClose( TMQueryPage page )
		{
			try { page.Mobile.CloseGump(typeof(TMHelp)); }
			catch{}
		}
Esempio n. 23
0
        public void GetGumpCode(TMQueryPage page)
        {
            Page          = page;
            this.Dragable = false;
            object o = page.GetValueSet();

            if (o is TMSkillSession)
            {
                Session = (TMSkillSession)o;
            }
            else
            {
                SkillSettings.SystemWrite("Error. No valid Session."); return;
            }
            if (!Session.Profile.StatEnable)
            {
                return;
            }
            Page.BaseSkinByType(this);
            Page.AddTitle("Stats: ", "Control", this);
            if (!Session.Profile.StatForce)
            {
                this.AddLabel(50, 70, Session.Skin.HighlightText, "Overall Max: " + Session.Profile.StatSum + " pts");
            }
            else
            {
                this.AddLabel(50, 70, Session.Skin.HighlightText, "Overall Requirement: " + Session.Profile.StatSum + " pts");
            }
            ButtonInfo inf2 = Session.Skin.ButtonInfo["StatAddButton"];

            Page.AddSuperButton(inf2.X, Page.Y + inf2.Y, inf2.H, inf2.W, inf2.bgID, Session.Skin.ListUnderButtonN, Session.Skin.ListUnderButtonP, Session.Skin.AddLabel, GumpButtonType.Reply, 1, 0, this);
            Dictionary <string, int> statvals = Session.Stats;
            GumpList g = new GumpList(this, "details", Session.Skin);

            g.SetColumnCount(3);
            g.AddColumn("Stat:");
            g.AddColumn("Max Value: ");
            g.AddColumn("Enter Value: ");
            GumpListEntry str = new GumpListEntry(0, 0, g, Session.Skin.EntryDefaultWidth, Session.Skin.EntryDefaultHeight);

            str.AddColumn("Strength");
            str.AddColumn("Max: " + Session.Profile.StrVal);
            str.AddColumn(new GumpTextEntry(0, 0, 25, Session.Skin.EntryDefaultHeight, Session.Skin.NormalText, 1000, statvals.ContainsKey("Strength") ? "" + statvals["Strength"]:""));
            GumpListEntry dex = new GumpListEntry(0, 0, g, Session.Skin.EntryDefaultWidth, Session.Skin.EntryDefaultHeight);

            dex.AddColumn("Dexterity");
            dex.AddColumn("Max: " + Session.Profile.DexVal);
            dex.AddColumn(new GumpTextEntry(0, 0, 25, Session.Skin.EntryDefaultHeight, Session.Skin.NormalText, 2000, statvals.ContainsKey("Dexterity") ? "" + statvals["Dexterity"] : ""));
            GumpListEntry intel = new GumpListEntry(0, 0, g, Session.Skin.EntryDefaultWidth, Session.Skin.EntryDefaultHeight);

            intel.AddColumn("Intelligence");
            intel.AddColumn("Max: " + Session.Profile.IntVal);
            intel.AddColumn(new GumpTextEntry(0, 0, 25, Session.Skin.EntryDefaultHeight, Session.Skin.NormalText, 3000, statvals.ContainsKey("Intelligence") ? "" + statvals["Intelligence"] : ""));
            g.Add(str);
            g.Add(dex);
            g.Add(intel);
            g.ShowDividers = true;
            g.X            = Session.Skin.SelectStartX;
            g.Y            = Session.Skin.SelectStartY;
            g.CommitList();
            Session.Mobile.SendGump(this);
        }
		private void Activate()
		{
			this.AddPage(1);
			//The heart of the matter. If a plugin is enabled...
			try
			{
				if ((bool)QueryPageHelper.PluginsEnabled[arg])
				{
					//Try to connect to the plugin's gump code repository.
					try
					{
						string toAct = "Server.TMSS." + (string)QueryPageHelper.GumpCalls[arg];//+"."+ControlPageHelper.GumpCalls[num]+"()";
						//SkillSettings.doTell( toAct );
						ObjectHandle handle = Activator.CreateInstance(null, toAct);
						TMPlugin theObj = (TMPlugin)handle.Unwrap();
						relplug = theObj;
						GumpType = relplug.getGumpType();						
						if (GumpType != "Underbar" && GumpType != "Master" && Mobile != null && Skin.HelpOn)
						{
							Dictionary<string, object> args = new Dictionary<string, object>();
							args.Add("Skin", this.Skin);
							args.Add("Mobile", Mobile);
							args.Add("Get", relplug);
							associatedHelpGump = new TMQueryPage("TMSS Session Help Gump", args);
							//Mobile.SendGump(associatedHelpGump);
						}						
						if( !(relplug is Gump) )
							BaseSkinByType(this);
						theObj.GetGumpCode(this);						
					}
					//If you can't, throw this exception.
					catch (Exception e)
					{
						SkillSettings.DoTell("Plugin errors on use. Please report this error, and do not attempt to use: " + arg + " Exception: " + e);
					}
				}
				//If the plugin is NOT enabled...
				else
				{
					SkillSettings.DoTell("Plugin not enabled: " + arg);
				}
			}
			catch( Exception e )
			{
				SkillSettings.DoTell("Error while creating plugin info. Arg was: "+arg+". Further info: "+e);
			}
		}
Esempio n. 25
0
		public override void OnResponse(NetState sender, RelayInfo info)
		{
            Mobile from = sender.Mobile;
		    //has 0, 101, and profile cases.
			//0: cancel, right-click.
			//101: Finish.
			//profile: gives 1-base index of profile to load in master profile.
			SkillSettings.DoTell("Button ID: "+info.ButtonID);
			
			if (info.ButtonID == 0 && sender.Mobile.AccessLevel >= SkillSettings.GumpControlLevel)
			{ this.Session.Close(); return; }
			else if( sender.Mobile.AccessLevel <= SkillSettings.GumpControlLevel && info.ButtonID == 0 ) { Page.Clone(); return;}

			if (info.ButtonID == 101)
			{
				if (Session.VerifyFinal())
				{ ClearGumps(sender); sender.Mobile.SendGump(new TMAlertGump("Congratulations, you are now ready to play the shard.")); }
				else
				{ sender.Mobile.SendGump(Page.Clone()); sender.Mobile.SendGump(new TMAlertGump(Session.CurrentErrorMessage) ); }				
				return;
			}
			
			int has = hasControlGump(sender);
			if (has != -1)
			{
				if( has == 1 )
					sender.Mobile.CloseGump( typeof( TMSkill ) );
				else if( has == 2 )
					sender.Mobile.CloseGump( typeof( TMStat ) );
			}
			
			if (info.ButtonID == 1 && Session.Profile.StatEnable)
			{				
				TMQueryPage p = new TMQueryPage("TMSS Stat Gump", Session);
				Page.Clone();
			}
			else
			{
				/*if (hasControlGump(sender))
				{
					sender.Mobile.SendGump(Page.Clone());
					sender.Mobile.SendGump(new TMAlertGump("You cannot open more than one selection page at a time."));					
					return;
				}*/
				int pro = info.ButtonID - 1;
				Dictionary<string, object> arg = new Dictionary<string, object>();
				arg.Add("Profile", prof.getProfile(pro));
				arg.Add("Session", Session);
				arg.Add("Skin", Session.Skin);
				arg.Add("Mobile", sender.Mobile);
				SkillSettings.DoTell("Master Gump skill gump send: Profile:"+prof.getProfile(pro)+" Session: "+Session+" Skin: "+Session.Skin+" Mobile: "+sender.Mobile);
				SkillSettings.DoTell("MG Session: TSP: "+Session.totalSelectedPoints+" TAP: "+Session.totalAllowedPoints);
				TMQueryPage p = new TMQueryPage("TMSS Skill Gump", arg);
				Page.Clone();
			}
		}
Esempio n. 26
0
		public void GetGumpCode(TMQueryPage page)
		{
			page.BaseSkinByType( this );
			int i = 0;
			GumpList gl = new GumpList( this, "details", page.Skin );
			gl.X = page.Skin.SelectStartX;
			gl.Y = page.Skin.SelectStartY;
			gl.AddColumn( "Super Profiles Available" );
			gl.AddColumn( "Item Profile Setter" );
			gl.AddColumn( "Set As Default" );
			gl.columns = 3;

			while (i < profilenames.Count)
			{ 
				GumpListEntry gle = new GumpListEntry( 0, 0, gl, 250, 20 );
				gle.AddColumn( "Set " + profilenames[i] + " on an item" );
				gle.AddColumn( new GumpButton( 0, 0, page.Skin.SelectDn, page.Skin.SelectUp, i+1, GumpButtonType.Reply, 0 ) );
				//gle.AddColumn(new GumpButton(0, 0, page.Skin.SelectDn, page.Skin.SelectUp, (i + 1)*-1, GumpButtonType.Reply, 0));
				GumpListEntry gl2 = new GumpListEntry(0, 0, gl, 250, 20);
				gl2.AddColumn("Set " + profilenames[i] + " as default");
				gl2.AddColumn(new GumpButton(0, 0, page.Skin.SelectDn, page.Skin.SelectUp, (i + 1) * -1, GumpButtonType.Reply, 0));
				gl.Add(gle);
				gl.Add(gl2);
				i++;
			}
			gl.CommitList();

			
			page.Mobile.SendGump( this );
		}
Esempio n. 27
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);
		}
Esempio n. 28
0
		public void GetGumpCode(TMQueryPage page)
		{
			page.BaseSkinByType(this);
			int i = 0;
			GumpList gl = new GumpList(this, "details", page.Skin);
			gl.X = page.Skin.SelectStartX;
			gl.Y = page.Skin.SelectStartY;
			gl.AddColumn("Skins Available");
						
			gl.SetColumnCount( 2 );
			gl.columnWidths[0] = page.Skin.ListWidth-100;
			gl.columnWidths[1] = 100;

			while (i < skinnames.Count)
			{
				if (SkinHelper.skList[skinnames[i]] is TMSS4Skin)
				{
					GumpListEntry gle = new GumpListEntry(0, 0, gl, 250, 20);
					gle.AddColumn("Set " + skinnames[i] + " on item");
					gle.AddColumn(new GumpButton(0, 0, page.Skin.SelectDn, page.Skin.SelectUp, i + 1, GumpButtonType.Reply, 0));
					GumpListEntry gl2 = new GumpListEntry(0, 0, gl, 250, 20);
					gl2.AddColumn("Set " + skinnames[i] + " as default");
					gl2.AddColumn(new GumpButton(0, 0, page.Skin.SelectDn, page.Skin.SelectUp, (i + 1) * -1, GumpButtonType.Reply, 0));
					gl.Add(gle);
					gl.Add(gl2);
				}
				i++;
			}
			gl.CommitList();

			page.Mobile.SendGump(this);
		}
Esempio n. 29
0
 public void GetGumpCode(TMQueryPage page)
 {
     return;
 }
Esempio n. 30
0
		public void GetGumpCode(TMQueryPage page)
		{			
			Page = page;
			this.Dragable =false;
			object o = page.GetValueSet();
			if (o is TMSkillSession)
				Session = (TMSkillSession)o;
			else
			{ SkillSettings.SystemWrite("Error. No valid Session."); return; }
			if( !Session.Profile.StatEnable )
				return;
			Page.BaseSkinByType(this);
			Page.AddTitle("Stats: ", "Control",this);
			if( !Session.Profile.StatForce )
				this.AddLabel(50, 70, Session.Skin.HighlightText, "Overall Max: "+Session.Profile.StatSum+" pts");
			else
				this.AddLabel(50, 70, Session.Skin.HighlightText, "Overall Requirement: " + Session.Profile.StatSum + " pts");
			ButtonInfo inf2 = Session.Skin.ButtonInfo["StatAddButton"];
			Page.AddSuperButton(inf2.X, Page.Y + inf2.Y, inf2.H, inf2.W, inf2.bgID, Session.Skin.ListUnderButtonN, Session.Skin.ListUnderButtonP, Session.Skin.AddLabel, GumpButtonType.Reply, 1, 0,this);
			Dictionary<string,int> statvals = Session.Stats;
			GumpList g = new GumpList(this, "details", Session.Skin );
			g.SetColumnCount( 3 );
			g.AddColumn( "Stat:" );
			g.AddColumn( "Max Value: ");
			g.AddColumn( "Enter Value: ");
			GumpListEntry str = new GumpListEntry( 0, 0, g, Session.Skin.EntryDefaultWidth, Session.Skin.EntryDefaultHeight );
			str.AddColumn( "Strength" );
			str.AddColumn( "Max: "+Session.Profile.StrVal );
			str.AddColumn( new GumpTextEntry( 0, 0, 25, Session.Skin.EntryDefaultHeight, Session.Skin.NormalText, 1000, statvals.ContainsKey("Strength") ? ""+statvals["Strength"]:"" ) );
			GumpListEntry dex = new GumpListEntry( 0, 0, g, Session.Skin.EntryDefaultWidth, Session.Skin.EntryDefaultHeight );
			dex.AddColumn("Dexterity");
			dex.AddColumn("Max: " + Session.Profile.DexVal);
			dex.AddColumn(new GumpTextEntry(0, 0, 25, Session.Skin.EntryDefaultHeight, Session.Skin.NormalText, 2000, statvals.ContainsKey("Dexterity") ? "" + statvals["Dexterity"] : ""));
			GumpListEntry intel = new GumpListEntry(0, 0, g, Session.Skin.EntryDefaultWidth, Session.Skin.EntryDefaultHeight);
			intel.AddColumn("Intelligence");
			intel.AddColumn("Max: " + Session.Profile.IntVal);
			intel.AddColumn(new GumpTextEntry(0, 0, 25, Session.Skin.EntryDefaultHeight, Session.Skin.NormalText, 3000, statvals.ContainsKey("Intelligence") ? "" + statvals["Intelligence"] : ""));
			g.Add(str);
			g.Add(dex);
			g.Add(intel);
			g.ShowDividers = true;
			g.X = Session.Skin.SelectStartX;
			g.Y = Session.Skin.SelectStartY;
			g.CommitList();
			Session.Mobile.SendGump(this);
		}
Esempio n. 31
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            //has 0, 101, and profile cases.
            //0: cancel, right-click.
            //101: Finish.
            //profile: gives 1-base index of profile to load in master profile.
            SkillSettings.DoTell("Button ID: " + info.ButtonID);

            if (info.ButtonID == 0 && sender.Mobile.AccessLevel >= SkillSettings.GumpControlLevel)
            {
                this.Session.Close(); return;
            }
            else if (sender.Mobile.AccessLevel <= SkillSettings.GumpControlLevel && info.ButtonID == 0)
            {
                Page.Clone(); return;
            }

            if (info.ButtonID == 101)
            {
                if (Session.VerifyFinal())
                {
                    ClearGumps(sender); sender.Mobile.SendGump(new TMAlertGump("Congratulations, you are now ready to play the shard."));
                }
                else
                {
                    sender.Mobile.SendGump(Page.Clone()); sender.Mobile.SendGump(new TMAlertGump(Session.CurrentErrorMessage));
                }
                return;
            }

            int has = hasControlGump(sender);

            if (has != -1)
            {
                if (has == 1)
                {
                    sender.Mobile.CloseGump(typeof(TMSkill));
                }
                else if (has == 2)
                {
                    sender.Mobile.CloseGump(typeof(TMStat));
                }
            }

            if (info.ButtonID == 1 && Session.Profile.StatEnable)
            {
                TMQueryPage p = new TMQueryPage("TMSS Stat Gump", Session);
                Page.Clone();
            }
            else
            {
                /*if (hasControlGump(sender))
                 * {
                 *      sender.Mobile.SendGump(Page.Clone());
                 *      sender.Mobile.SendGump(new TMAlertGump("You cannot open more than one selection page at a time."));
                 *      return;
                 * }*/
                int pro = info.ButtonID - 1;
                Dictionary <string, object> arg = new Dictionary <string, object>();
                arg.Add("Profile", prof.getProfile(pro));
                arg.Add("Session", Session);
                arg.Add("Skin", Session.Skin);
                arg.Add("Mobile", sender.Mobile);
                SkillSettings.DoTell("Master Gump skill gump send: Profile:" + prof.getProfile(pro) + " Session: " + Session + " Skin: " + Session.Skin + " Mobile: " + sender.Mobile);
                SkillSettings.DoTell("MG Session: TSP: " + Session.totalSelectedPoints + " TAP: " + Session.totalAllowedPoints);
                TMQueryPage p = new TMQueryPage("TMSS Skill Gump", arg);
                Page.Clone();
            }
        }
Esempio n. 32
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");
		}
Esempio n. 33
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);
        }
Esempio n. 34
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);
		}
Esempio n. 35
0
 internal void attemptHelpClose(TMQueryPage page)
 {
     try { page.Mobile.CloseGump(typeof(TMHelp)); }
     catch {}
 }
		public void GetGumpCode(TMQueryPage page)
		{
			return;
		}
		public static void MasterTest_OnCommand(CommandEventArgs e)
		{
			if (QueryPageHelper.PluginExists("TMMaster"))
			{
				TMSkillSession s = SessionGenerate(e);
				TMQueryPage page = new TMQueryPage("TMSS Session Master Gump", s); 
				//e.Mobile.SendGump( page );
			}
		}
		public static void SkillTest_OnCommand(CommandEventArgs e)
		{
			//ListTestGump g = new ListTestGump();
			if (QueryPageHelper.PluginExists("TMSkill"))
			{
				Dictionary<string, object> t = new Dictionary<string, object>();
				t.Add("Skin", SkinHelper.getSkin(SkillSettings.ControlSkinName));
				t.Add("Mobile", e.Mobile);
				SuperSkillProfile p = (SuperSkillProfile)SkillProfileHelper.getProfile("Default Profile");
				SkillProfile sp = p.getProfile(0);
				t.Add("Profile", sp);
				TMQueryPage pg = new TMQueryPage("TMSS Skill Gump", t);
				//e.Mobile.SendGump(pg);
			}
			else
			{
				DoTell("Error when creating Skill Gump. Plugin does not exist.");
				return;
			}
			
		}
Esempio n. 39
0
		public void Start()
		{
			if( invalidated )
				return;
			if (m_Mobile == null || m_Item == null || Profile == null || Skin == null )
			{ SkillSettings.DoTell("One or more necessary items are null, the session cannot continue."); return; }
			if (Profile.IsGumped)
			{
				WindowInfo masterinf = Skin.WindowInfo["Master"];
				subMaster = new TMQueryPage("TMSS Session Master Gump", this);
				//m_Mobile.SendGump( subMaster );
				//Mobile.SendGump( new TMQueryPage("TMSS Stat Gump", this ) );
				TMQueryPage tqp = new TMQueryPage("TMSS Stat Gump", this);
			}
			else if( Profile.StandTicket )
			{
				QuickMethod();
			}
			else
				SkillSettings.DoTell("Unable to continue. Invalid session configuration.");
		}
		public static void SkinSelect_OnCommand(CommandEventArgs e)
		{
			if (QueryPageHelper.PluginExists("TMSkinPage"))
			{
				SkillSettings.DoTell("Inside existing section.");
				Dictionary<string, object> args = new Dictionary<string, object>();
				args.Add("Skin", SkinHelper.getSkin(SkillSettings.CCSkinName));
				args.Add("Mobile", e.Mobile);
				TMQueryPage page = new TMQueryPage("TMSS Skin Selector", args);
				//e.Mobile.SendGump( page );
				SkillSettings.DoTell("Gump sent.");
			}
			else
				SkillSettings.DoTell("Plugin does not exist.");
		}