Hello!
Im trying to get arcane focus from spell arcane circle ever at max level cause our server now have small playerbase,so the OnCast method is:

C#:
public override void OnCast()
        {
            if (CheckSequence())
            {
                Caster.FixedParticles(0x3779, 10, 20, 0x0, EffectLayer.Waist);
                Caster.PlaySound(0x5C0);

                List<Mobile> Arcanists = GetArcanists();

                TimeSpan duration = TimeSpan.FromHours(Math.Max(1, (int)(Caster.Skills.Spellweaving.Value / 24)));

                duration += TimeSpan.FromHours(Math.Min(6, Arcanists.Count));

                int strengthBonus = Math.Min(IsBonus(Caster.Location, Caster.Map) ? 6 : 5, Arcanists.Sum(m => GetStrength(m))); // Math.Min(Arcanists.Count, IsBonus(Caster.Location, Caster.Map) ? 6 : 5);    //The Sanctuary is a special, single location place

                for (int i = 0; i < Arcanists.Count; i++)
                {
                    GiveArcaneFocus(Arcanists[i], duration, strengthBonus);
                }
            }

            FinishSequence();
        }
Tryed few things without resuslts,any advice?Thank you!
 
This is what I did. (edits are marked with //Visam I do that so I can easily find things I've changed.)

This lets a single caster cast the spell instead of the 2 player min.
C#:
        public override bool CheckCast()
        {
            if (!IsValidLocation(Caster.Location, Caster.Map))
            {
                Caster.SendLocalizedMessage(1072705); // You must be standing on an arcane circle, pentagram or abbatoir to use this spell.
                return false;
            }
/*
            if (GetArcanists().Count < 2)  //Visam removed to let a single caster cast the spell
            {
                Caster.SendLocalizedMessage(1080452); //There are not enough spellweavers present to create an Arcane Focus.
                return false;
            }  //Visam End */

            return base.CheckCast();
        }


And to up the bonus I did this:
C#:
        private void GiveArcaneFocus(Mobile to, TimeSpan duration, int strengthBonus)
        {
            if (to == null)    //Sanity
                return;

            if (strengthBonus < 5) //Visam increases the minimum bonus up to 5 can set to whatever minimum bonus you want
                strengthBonus = 5; //Visam End

            ArcaneFocus focus = FindArcaneFocus(to);

            if (focus == null)
            {
                ArcaneFocus f = new ArcaneFocus(duration, strengthBonus);
                if (to.PlaceInBackpack(f))
                {
                    to.AddStatMod(new StatMod(StatType.Str, "[ArcaneFocus]", strengthBonus, duration));

                    f.SendTimeRemainingMessage(to);
                    to.SendLocalizedMessage(1072740); // An arcane focus appears in your backpack.
                }
                else
                {
                    f.Delete();
                }
            }
            else //OSI renewal rules: the new one will override the old one, always.
            {
                to.SendLocalizedMessage(1072828); // Your arcane focus is renewed.
                focus.LifeSpan = duration;
                focus.CreationTime = DateTime.UtcNow;
                focus.StrengthBonus = strengthBonus;
                focus.InvalidateProperties();
                focus.SendTimeRemainingMessage(to);
            }
        }
 
This method,you sure is getting spell boost maxed too?i think you getting the strenght bonux maxed,but Arcanists continue as casters.
 
Back