What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[Custom Class] Mammon - The Prince of Greed, All-In-One Combat Routine

Status
Not open for further replies.
Can you read the discipline pool? Smart useage of SS + tactical advantage ( or even vault ) will greatly boost our speed, so at least we could try and smokescreen 0.5s after we opened a chest, after combat, if pool is full. Those 3 conditions are enough already to enhance our speed in most cases.

And preparation shouldn't trigger right off the bat every round :(

Vault is way a head, need some clever coding to do it, since it will fool bot to do something it does not want to do traveling too far from planned route. Then it starts backtracking A LOT.

As for smart use of smoke its on the agenda. As for tactical advantage.



Wow, this was exactly what I was looking for. The bot doesn't work without this plugin. Thanks a bunch!!

There is still a slight problem with my barbarian. I use frenzy as my primary attack. It attacks twice as slow with the bot. There's some sort of delay in between each attack cycle. I can kill things twice as fast just by holding the mouse key down manually.

I have not botted with frenzy yet but i can totally see it be a problem since it can be seen upon as a channeling spell. (its not, but it can resemble one) My suggestion is that you swap out frenzy. (btw if your farming for gold frenzy is not the best choice)
 
First off, thanks for the contribution. This CC for my DH is much better than the stock ones that come with DB. I plan to make some of my own improvements for the combat sequencing, thanks for the framework.

However, when my bot tries to sell, it just opens up the inventory and sits there (also spamming SS). Anyone else experiencing this behavior?

I am running build 99 of DB and this loot rule: http://www.thebuddyforum.com/attachments/demonbuddy-forum/demonbuddy-profiles/43417d1339542818-no-trash-loot-rules-keep-legendary-sell-blue-yellow-no-trash-keep-legendary-yellow-sell-blue.xml.html
 
Seems that Wizards are running a bit sluggish, but Monks performance has greatly improved.
 
Seems to spam SS all the time, going back to .11 until I can figure out why or it gets fixed if it's a problem for more than just myself.
 
The following is a mash up of a few of the barb attack functions with some wizard spells. it should work i believe have not tested it as my script needs to run for awhile without interuption cause im poor. if anyone wants to test and let me know what they find id be happy to try and fix any errors. otherwise hope it makes the wizard a little better for you.

if anyone has a referance of code that would do something like what follows:

Spell.CastOnUnit(SNOPower.Wizard_Meteor, ctx => ((DiaUnit)ctx).ACDGuid, extra => ClusterCount >= 4 within a 4ft radius),
require => Zeta.CommonBot.PowerManager.CanCast(Wizard_Meteor) && CombatTargeting.Instance.FirstNpc.Distance < 6f
),

PM me with the full script the code is from with note on which line its on plz :) think i figured this out now id like to figure out a way to say. Cast A if mob is within 6ft or B if mob is >6ft

plz someone let me know how this code works. if not ill test tommorow but id like to get some opinions.


Code:
using System;
using System.Linq;

using Mammon.Dynamics;
using Mammon.Helpers;
using Zeta;
using Zeta.Common;
using Zeta.CommonBot;
using Zeta.Internals.Actors;
using Zeta.TreeSharp;
using Action = Zeta.TreeSharp.Action;

namespace Mammon.Routines
{
    public class Wizard
    {
        private static int ClusterCount { get { return Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 20f); } }


        [Class(ActorClass.Wizard)]
        [Behavior(BehaviorType.OutOfCombat)]
        [Priority(2)]
        public static Composite WizardBuff()
        {
            return
            new PrioritySelector(
                    Spell.Buff(SNOPower.Wizard_IceArmor, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_IceArmor)),
                    Spell.Buff(SNOPower.Wizard_StormArmor, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_StormArmor)),
                    Spell.Buff(SNOPower.Wizard_EnergyArmor, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_EnergyArmor)),
                    Spell.Buff(SNOPower.Wizard_MagicWeapon, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_MagicWeapon))
            );
        }
        [Class(ActorClass.Wizard)]
        [Behavior(BehaviorType.Combat)]
        [Priority(1)]
        public static Composite WizardCombat()
        {
            return
                new PrioritySelector(ctx => CombatTargeting.Instance.FirstNpc,

                    Common.CreateWaitWhileIncapacitated(),
                    Common.CreateWaitForAttack(),
                    Common.CreateUsePotion(),

                    // Make sure we are within range/line of sight of the unit.
                    Movement.MoveTo(ctx => ((DiaUnit)ctx).Position, 40f),
                    //Movement.MoveToLineOfSight(ctx => ((DiaUnit)ctx)),

                    // Low health stuff
                    Spell.CastAOESpell(SNOPower.Wizard_DiamondSkin, extra => ZetaDia.Me.HitpointsCurrentPct <= 0.3),
                    Spell.Buff(SNOPower.Wizard_MirrorImage, extra => ZetaDia.Me.HitpointsCurrentPct <= 0.4),

                    //Buffs
                    Spell.Buff(SNOPower.Wizard_IceArmor, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_IceArmor)),
                    Spell.Buff(SNOPower.Wizard_StormArmor, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_StormArmor)),
                    Spell.Buff(SNOPower.Wizard_EnergyArmor, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_EnergyArmor)),
                    Spell.Buff(SNOPower.Wizard_MagicWeapon, extra => !ZetaDia.Me.HasBuff(SNOPower.Wizard_MagicWeapon)),
                    Spell.Buff(SNOPower.Wizard_Familiar, extra => !HasFamiliar),

                    // AoE spells.
                    Spell.CastAOESpell(SNOPower.Wizard_WaveOfForce, extra => ClusterCount >= 4,
					    require => Zeta.CommonBot.PowerManager.CanCast(Wizard_WaveOfForce) && CombatTargeting.Instance.FirstNpc.Distance < 6f
                    ),
					
                    Spell.CastAOESpell(SNOPower.Wizard_FrostNova, extra => ClusterCount >= 2),
						require => Zeta.CommonBot.PowerManager.CanCast(Wizard_FrostNova) && CombatTargeting.Instance.FirstNpc.Distance < 6f
                    ),
					
                    Spell.CastOnUnit(SNOPower.Wizard_EnergyTwister, ctx => ((DiaUnit)ctx).ACDGuid, extra => ClusterCount >= 2),
						require => Zeta.CommonBot.PowerManager.CanCast(Wizard_EnergyTwister) && CombatTargeting.Instance.FirstNpc.Distance < 18f
                    ),
					
                    Spell.CastOnUnit(SNOPower.Wizard_Meteor, ctx => ((DiaUnit)ctx).ACDGuid, extra => Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 6f) >= 4),
					
                    Spell.CastOnUnit(SNOPower.Wizard_Blizzard, ctx => ((DiaUnit)ctx).ACDGuid, extra => Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 6f) >= 4),
					
                    Spell.CastAOESpell(SNOPower.Wizard_ExplosiveBlast, extra => ClusterCount >= 3),
					    require => Zeta.CommonBot.PowerManager.CanCast(Wizard_ExplosiveBlast) && CombatTargeting.Instance.FirstNpc.Distance < 6f
                    ),

                    //Hydra
                    Spell.CastAtLocation(SNOPower.Wizard_Hydra, ctx => ((DiaUnit)ctx).Position, exta => !HasHydra),

                    // Arcane power spenders.
                    Spell.CastOnUnit(SNOPower.Wizard_ArcaneOrb, ctx => ((DiaUnit)ctx).ACDGuid),
                    Spell.CastOnUnit(SNOPower.Wizard_RayOfFrost, ctx => ((DiaUnit)ctx).ACDGuid),
                    Spell.CastOnUnit(SNOPower.Wizard_ArcaneTorrent, ctx => ((DiaUnit)ctx).ACDGuid),
                    Spell.CastOnUnit(SNOPower.Wizard_Disintegrate, ctx => ((DiaUnit)ctx).ACDGuid),

                    // Signature spells.
                    Spell.CastOnUnit(SNOPower.Wizard_SpectralBlade, ctx => ((DiaUnit)ctx).ACDGuid),
                    Spell.CastOnUnit(SNOPower.Wizard_Electrocute, ctx => ((DiaUnit)ctx).ACDGuid),
                    Spell.CastOnUnit(SNOPower.Wizard_ShockPulse, ctx => ((DiaUnit)ctx).ACDGuid),
                    Spell.CastOnUnit(SNOPower.Wizard_MagicMissile, ctx => ((DiaUnit)ctx).ACDGuid)

                );
        }

        public static bool HasFamiliar
        {
            get
            {
                int dynId = ZetaDia.Me.CommonData.DynamicId;
                var summoned = ZetaDia.Actors.GetActorsOfType<DiaUnit>().FirstOrDefault(u => u.SummonedByACDId == dynId && u.Name.Contains("Familiar"));
                return summoned != null;
            }
        }

        public static bool HasHydra
        {
            get
            {
                int dynId = ZetaDia.Me.CommonData.DynamicId;
                var summoned = ZetaDia.Actors.GetActorsOfType<DiaUnit>().FirstOrDefault(u => u.SummonedByACDId == dynId && u.Name.Contains("Hydra"));
                return summoned != null;
            }
        }

        public static void WizardOnLevelUp(object sender, EventArgs e)
        {
            if (ZetaDia.Me.ActorClass != ActorClass.Wizard)
                return;

            int myLevel = ZetaDia.Me.Level;

            Logger.Write("Player leveled up, congrats! Your level is now: {0}",
                myLevel
                );

            // Set Ray of Frost as secondary spell.
            if (myLevel == 2)
            {
                ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_RayOfFrost, -1, 1);
                Logger.Write("Setting Ray of Frost as Secondary");
            }

            // Set Shock Pulse as primary.
            if (myLevel == 3)
            {
                ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_ShockPulse, -1, 0);
                Logger.Write("Setting Shock Pulse as Primary");
            }

            if (myLevel == 4)
            {
                ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_FrostNova, -1, 2);
                Logger.Write("Setting Frost Nova as Defensive");
            }

            if (myLevel == 5)
            {
                ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_ArcaneOrb, -1, 1);
                Logger.Write("Setting Arcane Orb as Secondary");
            }

            if (myLevel == 8)
            {
                ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_DiamondSkin, -1, 2);
                Logger.Write("Setting Diamond Skin as Defensive");
            }

            if (myLevel == 9)
            {
                ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_WaveOfForce, -1, 3);
                Logger.Write("Setting Wave of Force as Force");

                ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_ShockPulse, -1, 2);
                Logger.Write("Changing rune for Shock Pulse: \"Explosive Bolts\"");
            }

            // First passive skill!
            if (myLevel == 10)
            {
                // Blur - Decreases melee damage taken by 20%.
                ZetaDia.Me.SetTraits(SNOPower.Wizard_Passive_Blur);
            }

            if (myLevel == 11)
            {
                ZetaDia.Me.SetActiveSkill(SNOPower.Wizard_ArcaneOrb, 2, 1);
                Logger.Write("Changing rune for Arcane Orb: \"Obliteration\"");
            }
        }
    }
}
 
Last edited:
The bot seems to waste my sprint most of the time, simply adding a movement check has made a huge speed boost: Spell.Buff(SNOPower.Barbarian_Sprint,
require => !ZetaDia.Me.HasBuff(SNOPower.Barbarian_Sprint)&& ZetaDia.Me.Movement.IsMoving)
 
Thanks for pointing it out will add it on svn right away.
 
thx for update. but new prob. he spam only rapidfire and dost not use hungryarrow to generating hate.
 
Right, swap out Rapid Fire for now its a channeling spell and they don't work as intended right now.
 
It is on hosted on my SVN server. See first post below installation.
 
DH works a way better now, thank u :)
Can u make it using preperation if discizplin is below 14?

Fan of Knives if 2 enemies are in a range of 15 yards would be also great.

thanks for ur work !
 
Fan of Knives added.

I will also ass smart disc / hate usage.
 
Finally a custom class that does what it's meant to do, such as drinking potions:
AjCxG.png


Only issue I see, at the moment, is that for the Wizards "disintegrate" it keeps casting, then stops, then starts, then stops.

Realized it has nothing to with my FPS, has to do with if diablo's the active window or not...
 
Last edited:
Mammon cant currently use channeling spells properly.

Will look at how this is done in Singular and see if i can port something :)
 
Doesn't seem to be breaking objects. Anyway to custom adjust the break object radius like the Generic class routine?
 
since .23 my demonhunters level 2-10 only wants to use rapidfire, not m1 anymore
 
Doesn't seem to be breaking objects. Anyway to custom adjust the break object radius like the Generic class routine?

What class is this? My Demon Hunter will even walk back to break objects.

since .23 my demonhunters level 2-10 only wants to use rapidfire, not m1 anymore

Thanks and i will look at it later, i have been planning on doing a 1-60 Demon Hunter once I'm done with the 1-60 Barbarian.
 
Status
Not open for further replies.
Back
Top