HispaRed Mir 2
Likes Likes:  6
Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Loyal Member Destroyer1987's Avatar
    Join Date
    Feb 2013
    Location
    In The Shadows
    Posts
    25

    Give Skelly pet AOE attack?

    hello,

    been trying myself for awhile and looked over forum (sorry if been resolved before)

    my question is how do you give tao pet skelly an aoe attack?

    allso to allow 2 pets to be summoned ie 2 skellys

    thanks in advance for any help
    Last edited by Destroyer1987; 11-10-2017 at 09:58 PM.
    When your about to level and no pots.. hopeing that last mob will die before you do ^.^

  2. HispaRed
  3. #2
    LOMCN Veteran chaosdeath's Avatar
    Join Date
    Mar 2012
    Location
    Newport, UK
    Posts
    1,171

    Re: Give Skelly pet AOE attack?

    https://imgflip.com/i/1xgwh2

    ---------- Post Merged at 07:45 PM ---------- Previous Post was at 08:04 AM ----------

    Small David I was not actually hating the guy . But I take it that every one sees things how they wish to see it. As his question clearly stated how do you give skelly an aoe attack

    My answer was one does not just give skelly an aoe attack .... but hey like I said each to their own ... although it would be nice to just give attacks to mobs pets etc rather than sit and code it then test etc

  4. #3
    Dedicated Member Violent's Avatar
    Join Date
    Oct 2008
    Location
    Chesterfield, UK
    Posts
    561

    Re: Give Skelly pet AOE attack?

    How do you want the AOE attack to work?

  5. #4
    Haile Selassie Gezza's Avatar
    Join Date
    Sep 2008
    Location
    uk
    Posts
    2,068

    Re: Give Skelly pet AOE attack?

    I'd like to see him with Crosshalfmoon ;p

  6. #5
    Dedicated Member Violent's Avatar
    Join Date
    Oct 2008
    Location
    Chesterfield, UK
    Posts
    561

    Re: Give Skelly pet AOE attack?

    Here is something that will get you started. This is very basic and may need tweaking. There is also no magic animation so it will perform like CHM but you wont see the CHM animation. (Graphics is not my strong point.)

    Go to BoneFamiliar.cs

    Add the following functions:

    Code:
            protected override void CompleteAttack(IList<object> data)
            {
                //If Skele is a pet then it will do an AOE attack.
                if (Master != null)
                {
                    AoeAttack();
                }
            }
    Code:
            /// <summary>
            /// JS - Attack all targets 1 space away from Skele.
            /// </summary>
            private void AoeAttack()
            {
                int damage = 0;
                
                //Get the damage based on the skele's DC
                damage = GetAttackPower(MinDC, MaxDC);
    
    
                if (damage == 0) return;
    
    
                //Loop round the cells around the skele to check for targets and do damage to them.
                for (int i = 0; i < 8; i++)
                {
                    Point target = Functions.PointMove(CurrentLocation, Direction, 1);
                    Direction = Functions.NextDir(Direction);
    
    
                    if (Target != null && target == Target.CurrentLocation)
                        Target.Attacked(this, damage, DefenceType.AC);
                    else
                    {
                        if (!CurrentMap.ValidPoint(target)) continue;
    
    
                        Cell cell = CurrentMap.GetCell(target);
                        if (cell.Objects == null) continue;
    
    
                        for (int o = 0; o < cell.Objects.Count; o++)
                        {
                            MapObject ob = cell.Objects[o];
                            if (ob.Race == ObjectType.Monster || ob.Race == ObjectType.Player)
                            {
                                if (!ob.IsAttackTarget(this)) continue;
    
    
                                ob.Attacked(this, damage, DefenceType.AC);
                            }
                            else continue;
    
    
                            break;
                        }
                    }
                }
            }
    That should get you started. Or at least give you some idea how to add new attacks to current monsters (without the graphics).

  7. #6
    Title Here... TheDayIDie's Avatar
    Join Date
    Jul 2011
    Location
    UK
    Posts
    3,739

    Re: Give Skelly pet AOE attack?

    He didn't specify the files he is using so I didn't bother replying.

    If he is using crystal then do what the two above have specified. Edit the BoneFamiliar.cs to include it or change the mon ai to a different number for BoneFamiliar in your database.

    P.s. OmaKing has an attack that hits everything around it.

  8. #7
    Loyal Member Destroyer1987's Avatar
    Join Date
    Feb 2013
    Location
    In The Shadows
    Posts
    25

    Re: Give Skelly pet AOE attack?

    thanks Violent i will try that now. Im using crystal m2 sorry i forgot to say that. i like the idea of CHM attack also the omaking.

    Im just after a way for skelly to be more helpfull to a tao for leveling.

    Also is it possible to change from 1 skelly to 2 skellys summoned?

    Again sorry if this has been explained before, trying to learn as much as i can.

    Violent : Rep Given, thank you.
    Last edited by Destroyer1987; 13-10-2017 at 12:57 PM.
    When your about to level and no pots.. hopeing that last mob will die before you do ^.^

  9. #8
    LOMCN Veteran chaosdeath's Avatar
    Join Date
    Mar 2012
    Location
    Newport, UK
    Posts
    1,171

    Re: Give Skelly pet AOE attack?

    Not sure if this is what you are looking for bud.

    http://www.lomcn.org/forum/showthrea...+multiple+pets

  10. #9
    Loyal Member Destroyer1987's Avatar
    Join Date
    Feb 2013
    Location
    In The Shadows
    Posts
    25

    Re: Give Skelly pet AOE attack?

    Perfect! thanks chaos : Rep given
    When your about to level and no pots.. hopeing that last mob will die before you do ^.^

  11. #10
    LOMCN Veteran chaosdeath's Avatar
    Join Date
    Mar 2012
    Location
    Newport, UK
    Posts
    1,171

    Re: Give Skelly pet AOE attack?

    No worries bud anytime

  12. #11
    Dedicated Member Violent's Avatar
    Join Date
    Oct 2008
    Location
    Chesterfield, UK
    Posts
    561

    Re: Give Skelly pet AOE attack?

    Glad we could help.

  13. #12
    Loyal Member Destroyer1987's Avatar
    Join Date
    Feb 2013
    Location
    In The Shadows
    Posts
    25

    Re: Give Skelly pet AOE attack?

    My bonfamiliar.cs files looks like this,

    //If Skele is a pet then it will do an AOE attack.
    if (Master != null)
    {
    AoeAttack();
    }
    }


    /// <summary>
    /// JS - Attack all targets 1 space away from Skele.
    /// </summary>
    private void AoeAttack()
    {
    int damage = 0;

    //Get the damage based on the skele's DC
    damage = GetAttackPower(MinDC, MaxDC);




    if (damage == 0) return;




    //Loop round the cells around the skele to check for targets and do damage to them.
    for (int i = 0; i < 8; i++)
    {
    Point target = Functions.PointMove(CurrentLocation, Direction, 1);
    Direction = Functions.NextDir(Direction);




    if (Target != null && target == Target.CurrentLocation)
    Target.Attacked(this, damage, DefenceType.AC);
    else
    {
    if (!CurrentMap.ValidPoint(target)) continue;




    Cell cell = CurrentMap.GetCell(target);
    if (cell.Objects == null) continue;




    for (int o = 0; o < cell.Objects.Count; o++)
    {
    MapObject ob = cell.Objects[o];
    if (ob.Race == ObjectType.Monster || ob.Race == ObjectType.Player)
    {
    if (!ob.IsAttackTarget(this)) continue;




    ob.Attacked(this, damage, DefenceType.AC);
    }
    else continue;




    break;
    }
    }
    }
    }


    is this correct? again i am sorry if ive done it wrong, all new to me but interesting enough to want to try and learn.
    When your about to level and no pots.. hopeing that last mob will die before you do ^.^

  14. #13
    Dedicated Member Violent's Avatar
    Join Date
    Oct 2008
    Location
    Chesterfield, UK
    Posts
    561

    Re: Give Skelly pet AOE attack?

    The first part needs to be in an override function like this:

    Code:
    protected override void CompleteAttack(IList<object> data)
            {
                //If Skele is a pet then it will do an AOE attack.
                if (Master != null)
                {
                    AoeAttack();
                }
            }
    Don't about asking questions if you are unsure. Genuine developers don't mind helping people out.

  15. #14
    Loyal Member Destroyer1987's Avatar
    Join Date
    Feb 2013
    Location
    In The Shadows
    Posts
    25

    Re: Give Skelly pet AOE attack?

    This is now the folder,

    protected override void CompleteAttack(IList<object> data)
    {
    //If Skele is a pet then it will do an AOE attack.
    if (Master != null)
    {
    AoeAttack();
    }

    /// <summary>
    /// JS - Attack all targets 1 space away from Skele.
    /// </summary>
    private void AoeAttack()
    {
    int damage = 0;

    //Get the damage based on the skele's DC
    damage = GetAttackPower(MinDC, MaxDC);




    if (damage == 0) return;




    //Loop round the cells around the skele to check for targets and do damage to them.
    for (int i = 0; i < 8; i++)
    {
    Point target = Functions.PointMove(CurrentLocation, Direction, 1);
    Direction = Functions.NextDir(Direction);




    if (Target != null && target == Target.CurrentLocation)
    Target.Attacked(this, damage, DefenceType.AC);
    else
    {
    if (!CurrentMap.ValidPoint(target)) continue;




    Cell cell = CurrentMap.GetCell(target);
    if (cell.Objects == null) continue;




    for (int o = 0; o < cell.Objects.Count; o++)
    {
    MapObject ob = cell.Objects[o];
    if (ob.Race == ObjectType.Monster || ob.Race == ObjectType.Player)
    {
    if (!ob.IsAttackTarget(this)) continue;




    ob.Attacked(this, damage, DefenceType.AC);
    }
    else continue;




    break;
    }
    }
    }
    }

    Do i have to input the spell into the code? Again really appreciate the time and help, hopefully once i have one working i can do more myself.
    When your about to level and no pots.. hopeing that last mob will die before you do ^.^

  16. #15
    Dedicated Member Violent's Avatar
    Join Date
    Oct 2008
    Location
    Chesterfield, UK
    Posts
    561

    Re: Give Skelly pet AOE attack?

    You just need to add that code to the already existing class called BoneFamiliar.cs

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •