Resource icon

Monster and Item Auras! 1.6.0

No permission to download
All the files are the same, now just contained in one zip

Effect Aura

This has no real purpose other than to demonstrate using a particle effect on targets, you can see the example with EffectCloak.cs
Particles.gif


Other changes

-Fixed a bug with items equipped that have auras on the item, before they would act the same as if the item was on the ground, now they work properly.

-Added the particle effect to the healing aura, it will now play a healing particle effect
-Also updated the healing aura to check if the target can receive beneficial acts from the aura owner

-Fixed an issue where the aura would always affect the aura owner when it should not have

Stat Buff Aura

This aura will provide a buff to all stats to anyone in the radius that is able to receive beneficial acts from the aura owner

The CystalStatBuffBall.cs will provide an example of this aura


Also updated evil mage example with a little better formatting

Life Leach

This aura - when coming from a mobile - will deal damage to anyone in the radius while healing the player also
When just coming from an item (items in backpacks are considered to come from that mobile, items on the ground are not considered to come from a mobile), it will simply deal damage as it has no one to heal.

I have included an example in CrystalLifeLeachBall.cs

C#:
private void AuraSetup()
        {
            m_LifeLeachAura = new Bittiez.Aura.Aura(this, 8, Bittiez.Aura.AURATYPE.LIFE_LEACH); //Set up the initial aura
            m_LifeLeachAura.DamageAmount = 1; //The aura will deal 1 damage to the target
            m_LifeLeachAura.HealingAmount = 1; //The aura will heal for 1 for each target damaged
        }
  • Like
Reactions: sahisahi

Mana Regen Aura

Added a mana regen aura:
-When used as an item on the ground it will regen mana for anyone in the radius
-When used on an item in a players backpack OR on a monster directly it will only regen mana of non-aggressive mobiles that can receive beneficial acts from the player/monster
-Included CrystalManaRegenBall.cs example file

Self Affect

Added an option to allow the aura to affect the mobile the aura is on(Player or monster), by default it will not affect the mobile the aura is coming from.
C#:
Aura.AffectsSelf = true;

Damaging aura

First I added a damage aura, I tried to think of the best way to accomplish this but if anyone has any suggestions let me know.
The way it works is
If the aura is an item on the ground, it will damage anything that can take damage in the aura radius

If the aura is on an item that the player is carrying in their backpack OR applied to a mobile directly, it will damage anyone that has aggro'd the player, or anyone the player has aggro'd IF that monster/animal/player can receive damage from the player.

You can find an example of the damaging aura in CrystalDamageBall.cs or if you'd like to add this to your own items/mobiles you will need to add a few pieces of code to your item/mobile:

Define the aura variable in your class:
C#:
private Bittiez.Aura.Aura m_DamageingAura;

Create a re-usable method to initiate the aura:
C#:
        private void AuraSetup()
        {
            m_DamageingAura = new Bittiez.Aura.Aura(this, 8, Bittiez.Aura.AURATYPE.DAMAGE); //Set up the initial aura
            m_DamageingAura.DamageAmount = 1; //Set the aura damage amount
        }

Call your new method in the Constructor for the item AuraSetup();

Call the method in the deserialize method AuraSetup();

If you are using this on a Mobile or an item that you want enabled only when a player is nearby(if no players are nearby disable the aura to save processor usage), add these overrides to your class:
C#:
        public override void OnSectorActivate()
        {
            m_DamageingAura.EnableAura();
            base.OnSectorActivate();
        }

        public override void OnSectorDeactivate()
        {
            m_DamageingAura.DisableAura();
            base.OnSectorDeactivate();
        }

I added a method to toggle the aura on and off via double-clicking an item(because the sector activate/deactivate won't work if the aura is on a player via an item):
C#:
        public override void OnDoubleClick(Mobile from)
        {
            if (m_DamageingAura.ToggleAura()) { from.SendMessage("Aura on!"); }
            else from.SendMessage("Aura off!");
        }
If you use the double click method, you may want to add some checks to make sure the player can access the item. Or maybe not :shrug:


I've also updated/changed a few things in Aura.cs to allow auras to work from an item placed in a players backpack.
Hey guys, I changed a few things here

Firstly I fixed an oversight, forgot the redefine the aura on deserialize.

Second, I added a Healing aura.

Third, auras can now be applied to objects.
Back