• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Custom Class] Mammon - The Prince of Greed, All-In-One Combat Routine

    Discussion in 'Archives' started by j0achim, Jun 11, 2012.

    Thread Status:
    Not open for further replies.
    1. CooleRnax

      CooleRnax New Member

      Joined:
      Dec 5, 2011
      Messages:
      98
      Likes Received:
      0
      Trophy Points:
      0
      if you add preporation it will be great
       
    2. mridontevenknowu

      mridontevenknowu New Member

      Joined:
      Jun 13, 2012
      Messages:
      229
      Likes Received:
      0
      Trophy Points:
      0
      after getting some advice in, syncirc, #crypts. i came up with the following wizard script. im going to run it now and see the results. this one should actually work.


      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, 30f),
                          //Movement.MoveToLineOfSight(ctx => ((DiaUnit)ctx)),
      
                          // Low health stuff
                          Spell.CastAOESpell(SNOPower.Wizard_DiamondSkin, extra => ZetaDia.Me.HitpointsCurrentPct <= 0.4),
                          Spell.Buff(SNOPower.Wizard_MirrorImage, extra => ZetaDia.Me.HitpointsCurrentPct <= 0.5),
      
                          //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,
                              require => Zeta.CommonBot.PowerManager.CanCast(SNOPower.Wizard_WaveOfForce) && CombatTargeting.Instance.FirstNpc.Distance < 2f && Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 8f) >= 2 && ZetaDia.Me.HitpointsCurrentPct <= 0.8
                          ),
                          Spell.CastAOESpell(SNOPower.Wizard_FrostNova,
                              require => Zeta.CommonBot.PowerManager.CanCast(SNOPower.Wizard_FrostNova) && CombatTargeting.Instance.FirstNpc.Distance < 2f && Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 8f) >= 2 && ZetaDia.Me.HitpointsCurrentPct <= 0.8
                          ),
                          Spell.CastOnUnit(SNOPower.Wizard_EnergyTwister,
                               ctx => ((DiaUnit)ctx).ACDGuid,
                               req => Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 15f) >= 2 && CombatTargeting.Instance.FirstNpc.Distance < 4f && Zeta.CommonBot.PowerManager.CanCast(SNOPower.Wizard_EnergyTwister)
                          ),
                          Spell.CastOnUnit(SNOPower.Wizard_Meteor,
                               ctx => ((DiaUnit)ctx).ACDGuid,
                               req => Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 15f) >= 2 && CombatTargeting.Instance.FirstNpc.Distance < 4f && Zeta.CommonBot.PowerManager.CanCast(SNOPower.Wizard_Meteor)
                          ),
      
                          Spell.CastOnUnit(SNOPower.Wizard_Blizzard,
                               ctx => ((DiaUnit)ctx).ACDGuid,
                               req => Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 15f) >= 2 && CombatTargeting.Instance.FirstNpc.Distance < 4f && Zeta.CommonBot.PowerManager.CanCast(SNOPower.Wizard_Blizzard)
                          ),
      
                          Spell.CastAOESpell(SNOPower.Wizard_ExplosiveBlast,
                               require => Zeta.CommonBot.PowerManager.CanCast(SNOPower.Wizard_ExplosiveBlast) && CombatTargeting.Instance.FirstNpc.Distance < 5f && Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 8f) >= 2
                          ),
      
                          //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\"");
                  }
              }
          }
      }
      
       
    3. pwnzoor

      pwnzoor New Member

      Joined:
      Jan 15, 2010
      Messages:
      91
      Likes Received:
      0
      Trophy Points:
      0
      leveling 3 demon hunters from 1-60 atm, poke me if you need something tested on them :)
       
    4. Haaken

      Haaken New Member

      Joined:
      Mar 11, 2012
      Messages:
      96
      Likes Received:
      0
      Trophy Points:
      0
      wait nvm, I'll have to test something first...
       
    5. xfox

      xfox New Member

      Joined:
      Mar 18, 2010
      Messages:
      217
      Likes Received:
      3
      Trophy Points:
      0
      nice routines !

      but my barbarian won't break objects... he walks there, stops and leaves the object unbroken.
       
    6. Bo0oo0m

      Bo0oo0m New Member

      Joined:
      Jun 11, 2012
      Messages:
      19
      Likes Received:
      0
      Trophy Points:
      0
      same here. Sometimes he does break it but most of the time he just goes up to a breakable e.g. a tree stump, looks at it for a bit and then walks off again xD
       
    7. j0achim

      j0achim New Member

      Joined:
      Jan 15, 2010
      Messages:
      532
      Likes Received:
      15
      Trophy Points:
      0
      I will see what i can find a little later perhaps something that is used on breakables.
       
    8. nucleotides

      nucleotides Active Member

      Joined:
      Jun 2, 2012
      Messages:
      1,060
      Likes Received:
      11
      Trophy Points:
      38
      Any chance you can tell me what profile you are using for leveling them? I want to do a DH but my hands don't want to. :D

      @j0achim. Good work man. Barb is kicking ass.
       
    9. pwnzoor

      pwnzoor New Member

      Joined:
      Jan 15, 2010
      Messages:
      91
      Likes Received:
      0
      Trophy Points:
      0
      @level 8 they begin to use m1 again :)
       
    10. catrix

      catrix New Member

      Joined:
      Jan 15, 2010
      Messages:
      139
      Likes Received:
      0
      Trophy Points:
      0
      I need a good Barbarian skill setup for this call... any suggestions ? :)
       
    11. CooleRnax

      CooleRnax New Member

      Joined:
      Dec 5, 2011
      Messages:
      98
      Likes Received:
      0
      Trophy Points:
      0
      Preporation must be used on low consentration
       
    12. CooleRnax

      CooleRnax New Member

      Joined:
      Dec 5, 2011
      Messages:
      98
      Likes Received:
      0
      Trophy Points:
      0
      It it will give big speed boosts with Smoke Screen
       
    13. nucleotides

      nucleotides Active Member

      Joined:
      Jun 2, 2012
      Messages:
      1,060
      Likes Received:
      11
      Trophy Points:
      38
      @j0achim: It seems that the barb can double use sprint right in a row, might solve some issues with sprint downtime.

      Perhaps a short wait after using it if possible?

      if anyone knows the syntax for it I can just add it myself :/
       
      Last edited: Jun 15, 2012
    14. j0achim

      j0achim New Member

      Joined:
      Jan 15, 2010
      Messages:
      532
      Likes Received:
      15
      Trophy Points:
      0
      Lots of small changes are being made on the svn server right now and cooldowns are one of them.

      I've just had a "perfect" session where bot was going strong without a single hiccup for 4 hours. So i can finally start benchmark changes being made and get some real data from changes i make :)
       
    15. nucleotides

      nucleotides Active Member

      Joined:
      Jun 2, 2012
      Messages:
      1,060
      Likes Received:
      11
      Trophy Points:
      38
      Good deal! Looking forward to this. see if I can get over 400k consistently
       
    16. markn12

      markn12 Member

      Joined:
      Jun 2, 2012
      Messages:
      795
      Likes Received:
      7
      Trophy Points:
      18
      Anyway to make it do wrath of the berserker vs elite mobs only ?
       
    17. cdmichaelb

      cdmichaelb New Member

      Joined:
      May 13, 2011
      Messages:
      243
      Likes Received:
      1
      Trophy Points:
      0
      Works great, but dh uses smokescreen on cool down even with no enemies around.

      It would be great if it used it on incoming projectiles it can't dodge, and for melee that are in too close. (Can the bot be made to dodge projectiles?)
       
      Last edited: Jun 15, 2012
    18. CooleRnax

      CooleRnax New Member

      Joined:
      Dec 5, 2011
      Messages:
      98
      Likes Received:
      0
      Trophy Points:
      0
      This is great movement speed is increased
       
    19. cdmichaelb

      cdmichaelb New Member

      Joined:
      May 13, 2011
      Messages:
      243
      Likes Received:
      1
      Trophy Points:
      0
      Staying alive is great movement speed increase ;)
       
    20. HB1859L68

      HB1859L68 New Member

      Joined:
      Jul 12, 2011
      Messages:
      340
      Likes Received:
      1
      Trophy Points:
      0
      does ur svn contain updates not yet posted here?


      Edit: just svned ya looks like u made some changes, would be easier if u just made updates to ur svn rather than uploading in thread all the time. not sure if thats something u plan to do or not.
       
      Last edited: Jun 15, 2012
    Thread Status:
    Not open for further replies.

    Share This Page