Hello everyone,

using ServUO

i'm trying to hide from the craftlist of every def.cs the craft index to the recipes that player doesn't know.
I've tryed to start from CraftSystem.cs, editing:

Code:
public CraftSystem(int minCraftEffect, int maxCraftEffect, double delay, Mobile from) //edit here
        {
            m_MinCraftEffect = minCraftEffect;
            m_MaxCraftEffect = maxCraftEffect;
            m_Delay = delay;

            m_CraftItems = new CraftItemCol();
            m_CraftGroups = new CraftGroupCol();
            m_CraftSubRes = new CraftSubResCol();
            m_CraftSubRes2 = new CraftSubResCol();

            InitCraftList(from);//edit here
            AddSystem(this);
        }

    public abstract void InitCraftList(Mobile from) //edit here;

and then on every def.cs i've tryed to edit the base construct:

Code:
 private DefBlacksmithy()
            : base(1, 1, 1.25, Mobile from) // base( 1, 2, 1.7 ) edit here
        {
            /*
            base( MinCraftEffect, MaxCraftEffect, Delay )
            MinCraftEffect    : The minimum number of time the mobile will play the craft effect
            MaxCraftEffect    : The maximum number of time the mobile will play the craft effect
            Delay            : The delay between each craft effect
            Example: (3, 6, 1.7) would make the mobile do the PlayCraftEffect override
            function between 3 and 6 time, with a 1.7 second delay each time.
            */
        }
public override void InitCraftList(from)
        {
		//tryed to hide doing this:
		
		/*if ( from != null && ((PlayerMobile)from).HasRecipe((int)SmithRecipes.TrueSpellblade))
			{								
				 index = AddCraft(typeof(TrueSpellblade), 1011081, 1073513, 75.0, 125.0, typeof(LingottoFerro), 1044036, 14, 1044037);
                 		   AddRes(index, typeof(BlueDiamond), 1032696, 1, 1044240);
             		       AddRecipe(index, (int)SmithRecipes.TrueSpellblade);
			}*/

	}

But of course my script skill is not enough cause the DefBlacksmithy contruct on "Mobile from" giving me error on compiling: need ")" and need "}".
the only way is to set it to "null" but of couse that check to see if player knows the recipe is useless, "from" seems to be always null.

Any tips or advice?:(

Moreover i've tryed to add new recipe items, i've added a new enum on the top:
Code:
 public enum SmithRecipes
    {
        NewItem = 5000,
     }

and then added the index on the craft list but when i do [add recipescroll 5000 the scroll seems to be empty and does nothing on doubleclick. I've tryed to switch that "5000" to a existing recipe like the "truespellblade (300)" but when i add the recipescroll 300 it appears always with "true spellblade recipe" and not with "New item recipe".
What i'm missing?

Thank you so much
 
Last edited:
Back