Okay I got baseArmor & baseJewel to display get prop gump & added the GetContextMenuEntries

Got my baseCloth script edited same exsact way i did the others but it is not displaying getprop gump in game.

& yes i added the using Server.Engines.XmlSpawner2; to both the cloth & jewel scripts

GetContextMenuEntries
Code:
			XmlLevelItem levitem = XmlAttach.FindAttachment(this, typeof(XmlLevelItem)) as XmlLevelItem;

			if (levitem != null)
			{
				list.Add(new LevelInfoEntry(from, this, AttributeCategory.Melee));
			}

GetProperties
Code:
XmlLevelItem levitem = XmlAttach.FindAttachment(this, typeof(XmlLevelItem)) as XmlLevelItem;
      if (levitem != null)
      {
        list.Add(1060658, "Level\t{0}", levitem.Level);
        if (LevelItems.DisplayExpProp)
        {
          list.Add(1060659, "Experience\t{0}", levitem.Experience);
        }

the Server starts up and runs with out error so i cant tell where i went wrong on this one

attached my BC.cs if anybody can help
 

Attachments

  • BaseClothing.cs
    61.3 KB · Views: 5
not sure if i can be of any help, but could you post the script in code so we don't have to download to view it?
 
its not letting post the whole script hope this is enough for both parts

Code:
        public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
        {
            base.GetContextMenuEntries(from, list);

            if (this.BlessedFor == from && this.BlessedBy == from && this.RootParent == from)
            {
                list.Add(new UnBlessEntry(from, this));
            }

			XmlLevelItem levitem = XmlAttach.FindAttachment(this, typeof(XmlLevelItem)) as XmlLevelItem;

			if (levitem != null)
			{
				list.Add(new LevelInfoEntry(from, this, AttributeCategory.Melee));
			}

		}

        private class UnBlessEntry : ContextMenuEntry
        {
            private readonly Mobile m_From;
            private readonly BaseClothing m_Item;

            public UnBlessEntry(Mobile from, BaseClothing item)
                : base(6208, -1)
            {
                this.m_From = from;
                this.m_Item = item; // BaseArmor, BaseWeapon or BaseClothing
            }

Code:
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);
			
			XmlLevelItem levitem = XmlAttach.FindAttachment(this, typeof(XmlLevelItem)) as XmlLevelItem;

			if (levitem != null)
			{
				list.Add(1060658, "Level\t{0}", levitem.Level);

				if (LevelItems.DisplayExpProp)
				{
					list.Add(1060659, "Experience\t{0}", levitem.Experience);
				}
		}
 
so it's the properties gump that isn't displaying at all or correctly?

I know you said you couldn't paste the full thing, but based on the code you listed above, there's a missing brace.
But i'm assuming that you're adding that to the existing GetProperties in Baseclothing, right?

C#:
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
 
//added
XmlLevelItem levitem = XmlAttach.FindAttachment(this, [URL='http://www.google.com/search?q=typeof+msdn.microsoft.com']typeof[/URL](XmlLevelItem)) as XmlLevelItem
 
if (levitem != null) 
   { 
         list.Add(1060658, "Level\t{0}", levitem.Level);  if (LevelItems.DisplayExpProp) 
         {  
            list.Add(1060659, "Experience\t{0}", levitem.Experience); 
          }
   }
//end added
 
#region Imbuing
if (this.m_TimesImbued > 0)
list.Add(1080418); // (Imbued)
#endregion
 
....yadda yadda yadda
} /// end brace for get properties
 
:)yes to all, even adding to the existing GetProperties in Baseclothing. i noticed where it needs to fit in based on the baseweapon.cs which has it already

the display gump is showing the normal cloth item gump.

but it worked for the others first time so i looked at the braces & it looks right

im just going to revert back to the orginal base .cs & keep doing it till i get it right

no worries man i got this:cool: im pretty sure its a brace too
 
:DI just realized i dont want level clothes, Imbuing, fine:rolleyes:... too many level items is pointless if i can raise the cap (IF i want to) on armor & *weapon*o_O..... ~`jewelry`~ with leveling gives it real purpose.... (i dont have to create custom everything)... may limit imbuing to clothes only or not allow leveled items to be ?... undecided

I had to get rid of the stupid queen :p

i just changed the Queen loyalty to Eternal Loyalty changed the lame red blue green to sweetness for now it has awesome titles
that lead up to the name of the shard :cool:& thanks to a post by Jbob i can add loyalty point gain to any monsters i want... thanks jbob for the Script templete ida got there but i was already thinking bout it when i saw his post , end happy dance.
 
Last edited:
Back