Hello, I am looking for help on implementing a bleed attack to bows. I am using CurrentExpansion.UOR and was hoping to modyify the OnHit function of BaseRanged to add a bleed attack, similar to the OnHit functions of Paralyzing Blows, Concussion Blows, and Crushing Blows of the other weapon types but am running into problems.

The other special hits don't seem to call WeaponAbility.ConcussionBlow, CrushingBlow, etc. so I'm having a hard time implementing a bleed attack on my ranged weapons.

BaseRanged.cs OnHit() function:

Code:
if (attacker.Player && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble())
            {
               
		defender.SendMessage("You receive a paralyzing blow!"); // Is this not localized?
                defender.Freeze(TimeSpan.FromSeconds(2.0));

                attacker.SendMessage("You deliver a paralyzing blow!"); // Is this not localized?
                attacker.PlaySound(0x11C);
            }

As you can see, the Paralyzing blow is coded with a Freeze function instead of applying the WeaponAbility.ParalyzingBlow. How would I go about modifying this portion to add a bleed attack?

Thanks for the help!
 
Code:
            if (attacker.Player && (attacker.Skills[SkillName.Anatomy].Value/400.0) >= Utility.RandomDouble())
            {
                attacker.SendLocalizedMessage(1060159); // Your target is bleeding!
                defender.SendLocalizedMessage(1060160); // You are bleeding!

                if (defender is PlayerMobile)
                {
                    defender.LocalOverheadMessage(MessageType.Regular, 0x21, 1060757); // You are bleeding profusely
                    defender.NonlocalOverheadMessage(MessageType.Regular, 0x21, 1060758, defender.Name); // ~1_NAME~ is bleeding profusely
                }

                defender.PlaySound(0x133);
                defender.FixedParticles(0x377A, 244, 25, 9950, 31, 0, EffectLayer.Waist);

                BleedAttack.BeginBleed(defender, attacker, false);
            }
 
Doh! I was trying to add the bleed attack via defender.function. Suppose I should have looked at the BleedAttack constructor. Thank you so much!
 
Back