Serj

Member
Hi
I would like to set fix Stats depending which prof. player choose in CharacterCreation gump
So it works with race like this
C#:
private static void SetStats(Mobile m, NetState state, int str, int dex, int intel)
        {
            var max = state.NewCharacterCreation ? 225 : 250;//

            FixStats(ref str, ref dex, ref intel, max);

            if (str < 10 || str > 60 || dex < 10 || dex > 60 || intel < 10 || intel > 60 || (str + dex + intel) != max)
            {
                if( m.Race==Race.Elf)
                {
                str = 70;//
                dex = 25;//
                intel = 100;//
                }
                else
                    {
                str = 100;//
                dex = 10;//
                intel = 100;//
                }
            }

            m.InitStats(str, dex, intel);
        }
But not with profession
I tryied to use
if(args.profession==1) or
if (prof==1) or
if (pm.profession==1)
nothing seems to work
 
I don't have a server to reference at the moment.

But I guess that function is called then you have not selected a specific profession. It is called then you selected your own skills.
Isn't it another function with the same name that has an extra parameter called "prof " used when you select your profession?

-Grim
 
there is
C#:
private static void SetSkills(Mobile m, SkillNameValue[] skills, int prof)
        {
            switch (prof)
            {
                case 1: // Warrior
                {
                    skills = new[]
                    {
                        new SkillNameValue(SkillName.Hiding, 99), new SkillNameValue(SkillName.Parry, 99),
                        new SkillNameValue(SkillName.Swords, 99), new SkillNameValue(SkillName.Healing, 99)
                        , new SkillNameValue(SkillName.MagicResist, 99)
                    };

                    break;
                }
                case 2: // Magician
                {
                    skills = new[]
                    {
                        new SkillNameValue(SkillName.EvalInt, 100),
                        new SkillNameValue(SkillName.Magery, 99), new SkillNameValue(SkillName.Meditation, 99),
                        new SkillNameValue(SkillName.Hiding, 99), new SkillNameValue(SkillName.Healing, 99)
                    };

                    break;
                }
                case 3: // Blacksmith
                {
                    skills = new[]
                    {
                        new SkillNameValue(SkillName.AnimalTaming, 99), new SkillNameValue(SkillName.AnimalLore, 100),
                        new SkillNameValue(SkillName.Veterinary, 99), new SkillNameValue(SkillName.Hiding, 99), new SkillNameValue(SkillName.Healing, 99)
                    };

                    break;
and so on...
 
Should be a function like SetStats(Mobile m, NetState state, int Profession, int str, int dex, int intel) if there isn't a changed recently. This function is called when a player has selected a profession and the stats are set ardently.

-Grim
 
WA o_O Thanks
I don't have this part Maybe i have an old version or i deleted it for some reason
P.S. Interesting How they use the same "method" by adding one parameter
 
Ah ok, It was added on 3rd April so it is a new addition to the server. You can still copy the function and implement it on your own server if you have too many things changed.

-Grim
 
hmm strange
First need to switch with places-priority method "SetStats"
second its get variables from... I don't know where from Cause such variables even not exist in method SetStats
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back