Resource icon

Custom Abilities for your monsters 3.0

No permission to download
Custom Abilities 3.0:
BIG CHANGES for adding creatures that use Custom Abilities! It's is now much easier to add these to your own monsters.
3.0 includes a file, AbilityCreature.cs, which acts as an extension of BaseCreature.
to make your creature an AbilityCreature simply look for the line that looks like this:
(as an example we'll look at the Dragon)
    public class Dragon : BaseCreature
and change the line to:
    public class Dragon : AbilityCreature

Now you can add any ability to your dragons by adding them in the constructor.
We'll simpply added this one line:
(As an example, we'll add the FlameStrikeCone ability)
            AddCustomAbility(new FlameStrikeCone());

Now this is what the dragon's whole constructor looks like:
        public Dragon()
            : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
            Name = "a dragon";
            Body = Utility.RandomList(12, 59);
            BaseSoundID = 362;

            SetStr(796, 825);
            SetDex(86, 105);
            SetInt(436, 475);

            SetHits(478, 495);

            SetDamage(16, 22);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 55, 65);
            SetResistance(ResistanceType.Fire, 60, 70);
            SetResistance(ResistanceType.Cold, 30, 40);
            SetResistance(ResistanceType.Poison, 25, 35);
            SetResistance(ResistanceType.Energy, 35, 45);

            SetSkill(SkillName.EvalInt, 30.1, 40.0);
            SetSkill(SkillName.Magery, 30.1, 40.0);
            SetSkill(SkillName.MagicResist, 99.1, 100.0);
            SetSkill(SkillName.Tactics, 97.6, 100.0);
            SetSkill(SkillName.Wrestling, 90.1, 92.5);

            Fame = 15000;
            Karma = -15000;

            VirtualArmor = 60;

            Tamable = true;
            ControlSlots = 3;
            MinTameSkill = 93.9;

            AddCustomAbility(new FlameStrikeCone());

Now, let's say we want to add an Ice Version of FlameStrikeCone to our White Wyrm:
First change the line where it says the class name to look like:
    public class WhiteWyrm : AbilityCreature

Then add this to its constrcutor:
        FlameStrikeCone fsc = new FlameStrikeCone();
        fsc.Type = FlameStrikeCone.StrikeType.Ice;
        fsc.SetDamage(18, 27);
You can add it under all of the skills, karma, etc.

You can follow this format for any and all abilities you'd like to add.

-You can add multiple abilities to creatures this way.
-Each Ability comes with a default damage, so you do not need to use the SetDamage method.
-Every ability has different variables that can be customized.
-Some abilities are more customizable than others.
-There is no longer any need to modify the OnThink() method.
-However, creatures that use CustomAbilities though that method,
(the old way, during 1.0 and 2.0) do not NEED to be changed at all.
-The new way of adding these abilities is purely for convenience purposes.
WARNING: If you change any of your creatures from BaseCreature to AbilityCreature,
make sure you remove ALL current instances of that creature before restarting teh server with the change.
It will make you delete every instance of that creature and cause a one time fatal error.

-If you have a mount you wish to give Custom Abilities to, simple change the class name line of code to AbilityMount, instead of AbilityCreature.
Like this:
    public class Nightmare : AbilityMount

Finally, if you have a creature that uses the Ability Heal Allies, AbilityCreatures can add allies to use it on with the AddFriend method:
-The AddFriend method takes a string argument that is the creature's TypeName. This is an example of it in use:
-This can also be added in the creature's constructor.

That should be all of the updates for 3.0!

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

I'm also going to add a link to a bonus monster pack for extra unique custom monsters that use these Custom Abilities. I didn't feel that this was a unique enough script to warrant its own post, so I'm adding it here as optional bonus content:

Bonus Creature Pack

This is how to add abilities to creatures that are NOT an AbilityCreature:
(This was the only way of adding abilities prior to 3.0, but is more complicated and less functional)

This is an example of how Adding an ability to your monster would look like:
This code is placed in the class. You can see examples of this in the mobiles in the pakcage.
    Firebolt fb = new Firebolt();
Then, to make that monster cast the ability, it would look like this:
        public override void OnThink()
            CustomAbility.CheckTrigger(this, fb);
If you wanted to add multiple abilities to one creature:

    Firebolt fb = new Firebolt();
    FlameStrikeTargeted fst = new FlameStrikeTargeted();
    IcePrison ip = new IcePrison();
    FlameStrikeAoe fsa = new FlameStrikeAoe();
    CustomAbilityList list;
Then, to allow the creature to cast all of those abilities using the custom ability list:

        public override void OnThink()
        if( list == null)
            list = new CustomAbilityList();
            fst.Type = FlameStrikeTargeted.StrikeType.Ice;
            fb.Type = Firebolt.BoltType.Ice;
            fb.SetDamage(10, 14);
            fst.SetDamage(18, 21);
            //flameStrikeAoe is not added to the list b/c it's only used on death in this case.


I really hope this is enough explain how to implement these skills into your server and onto your creatures, and hope people find them fun and interesting. Any questions are welcome in the comments. I had a lot of fun creating these and if the community seems to like them, I'll probably make some additions.
Thanks and enjoy,
First release
Last update
5.00 star(s) 1 ratings

More resources from Massapequa

Latest Updates

  1. More Custom Abilities for your monsters

    Custom Abilities 3.0: The main focus of this update was to make it easier for admins to add...
  2. More Custom Abilities for your monsters

    Custom Abilities 2.0: So I've updated my Custom Abilities for monsters by adding a bunch of...