public ListTestGump() : base(0, 0) { SkillSettings.DoTell("Setting up new ListTestGump."); BaseSkin skin = SkinHelper.getSkin(SkillSettings.ControlSkinName); this.AddBackground(0, 0, 500, 500, 9270); GumpList list = new GumpList(this, "details", skin); SkillSettings.DoTell("List Created."); GumpListEntry e1 = new GumpListEntry(0, 0, list, skin.EntryDefaultWidth, skin.EntryDefaultHeight); e1.AddColumn("This is a column."); e1.AddColumn("This is a 2nd column."); e1.AddColumn("This is the 3rd column."); SkillSettings.DoTell("Entry 1 Created."); GumpListEntry e2 = new GumpListEntry(0, 0, list, skin.EntryDefaultWidth, skin.EntryDefaultHeight); e2.AddColumn("This is r2 c1."); e2.AddColumn("this is r2 c2."); e2.AddColumn("this is r2 c3."); SkillSettings.DoTell("Entry 2 Created."); list.Add(e1); list.Add(e2); SkillSettings.DoTell("Entries added to list."); list.AddColumn("1st column."); list.AddColumn("2nd column."); list.AddColumn("3rd column."); SkillSettings.DoTell("List columns added."); list.columns = 3; list.CommitList(); }
public override void OnClick() { if (m_Stone != null) { if (m_Stone.Deleted) { return; } if (m_From.AccessLevel >= SkillSettings.GumpControlLevel) { Dictionary <string, object> args = new Dictionary <string, object>(); args.Add("Skin", SkinHelper.getSkin(SkillSettings.ControlSkinName)); args.Add("Mobile", m_From); m_From.SendGump(new TMQueryPage("Profile Selector", args)); } else { m_From.SendMessage("You do not have the proper accesslevel for that."); } } else { m_From.SendMessage("Unkown object to work with."); } }
public static void TMSS_OnCommand(CommandEventArgs e) { Dictionary <string, object> args = new Dictionary <string, object>(); args.Add("Skin", SkinHelper.getSkin(SkillSettings.ControlSkinName)); args.Add("Mobile", e.Mobile); e.Mobile.SendGump(new TMQueryPage("Main Menu", args)); }
public BaseTMSkillItem(int itemid) : base(itemid) { try { this.Profile = (SuperSkillProfile)SkillProfileHelper.Supers[SkillSettings.CCProfileName]; this.Skin = ((TMSS4Skin)SkinHelper.getSkin(SkillSettings.CCSkinName)).SkinName; } catch (Exception e) { SkillSettings.DoTell("Exception in attempting to set profile: " + e); } this.ItemID = itemid; }
public BaseTMSkillItem() { try { this.Profile = (SuperSkillProfile)SkillProfileHelper.Supers[SkillSettings.CCProfileName]; this.Skin = ((TMSS4Skin)SkinHelper.getSkin(SkillSettings.CCSkinName)).SkinName; } catch (Exception e) { SkillSettings.DoTell("Exception in attempting to set profile: " + e); } m_AutoGenerated = false; }
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."); } }
public override void OnClick() { if (m_Stone.Deleted || !m_From.CheckAlive()) { return; } if (m_From.AccessLevel >= SkillSettings.GumpControlLevel) { Dictionary <string, object> args = new Dictionary <string, object>(); args.Add("Skin", SkinHelper.getSkin(SkillSettings.ControlSkinName)); args.Add("Mobile", m_From); m_From.SendGump(new TMQueryPage("Main Menu", args)); } //m_From.SendGump(new TMControlPage(ControlPageHelper.getPluginID("Main Menu")));//TODO: Change to Help Gump else { m_From.SendMessage("You do not have the proper accesslevel for that."); } }
public override void OnClick() { if (!m_From.CheckAlive()) { return; } if (m_From.AccessLevel >= SkillSettings.GumpControlLevel) { Dictionary <string, object> args = new Dictionary <string, object>(); args.Add("Skin", SkinHelper.getSkin(SkillSettings.ControlSkinName)); args.Add("Mobile", m_From); m_From.SendGump(new TMQueryPage("Profile Selector", args)); } //m_From.SendGump(new SkillSetGump(m_profile)); else { m_From.SendMessage("You do not have the proper accesslevel for that."); } }
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; } }
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); } } }
public MainTMSSMenu() { sk = (TMSS4Skin)SkinHelper.getSkin(SkillSettings.CCSkinName); }