• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • simple hold key down rotations help

    Discussion in 'Community Developer Forum' started by stewiethecat, Jun 27, 2015.

    1. stewiethecat

      stewiethecat Member

      Joined:
      Feb 4, 2011
      Messages:
      454
      Likes Received:
      0
      Trophy Points:
      16
      looking for a simple hold key down, force enmity rotation to kupo warrior routine. I used to use this written by Exmortem. But I think it's now obsolite?

      Code:
              protected override Composite CreateCombat()        {
                  return new PrioritySelector(
                      new Decorator(ret => { 
      
      
                          if (KeyboardPolling.IsKeyDown(System.Windows.Forms.Keys.LShiftKey))
                              return true;
      
      
                          return false;
                      
                      }, new PrioritySelector(
                          Cast("Butcher's Block", r => Actionmanager.LastSpell.Name == "Skull Sunder", r => Core.Player.CurrentTarget),
                          Cast("Skull Sunder", r => Actionmanager.LastSpell.Name == "Heavy Swing", r => Core.Player.CurrentTarget),
                          Cast("Heavy Swing", r => true, r => Core.Player.CurrentTarget)                  
                          )),
      
      
                      new Decorator(ret => { 
      
      
                          if (KeyboardPolling.IsKeyDown(System.Windows.Forms.Keys.LControlKey))
                              return true;
      
      
                          return false;
                      
                      }, new PrioritySelector(
                          Apply("Fracture"),
                          Cast("Storm's Eye", r => !Core.Player.CurrentTarget.HasAura("Storm's Eye", true, msLeft:3000) && Actionmanager.LastSpell.Name == "Maim", r => Core.Player.CurrentTarget),
                          Cast("Storm's Path", r => !Core.Player.CurrentTarget.HasAura("Storm's Path", true, msLeft:3000) && Actionmanager.LastSpell.Name == "Maim", r => Core.Player.CurrentTarget),
                          Cast("Maim", r => Actionmanager.LastSpell.Name == "Heavy Swing", r => Core.Player.CurrentTarget),
                          Cast("Heavy Swing", r => true, r => Core.Player.CurrentTarget)
                          )),
      any help with this would be appreciated. Something that can hold me over until some of the newer routines come out which then i can donate :)
       
    2. dataruman

      dataruman New Member

      Joined:
      Apr 9, 2015
      Messages:
      9
      Likes Received:
      0
      Trophy Points:
      0
      I have this snippet working in Kupo now but I had to modify it some. Can you tell me exactly what you're looking for? An update version for the new abilities? or is the above not working anymore? I'm working on a PLD and WAR rotation with an alternate combo like the above but I'm not 100% sure how I want the logic to work yet.
       
    3. stewiethecat

      stewiethecat Member

      Joined:
      Feb 4, 2011
      Messages:
      454
      Likes Received:
      0
      Trophy Points:
      16
      just looking for something similar to the code above. I want to prioritize enmity rotation over dps rotation when needed. so if i hold down the shift key it will prioritize skull sunder / butcher block
       
    4. stewiethecat

      stewiethecat Member

      Joined:
      Feb 4, 2011
      Messages:
      454
      Likes Received:
      0
      Trophy Points:
      16
      Can anyone help with this? still trying to figure out how to add something like Ifkeyisdown do this rotation

      Code:
      
              public static async Task<bool> WarriorRotation()
      
      
              {
                  if (!Me.CurrentTarget.IsViable())
                  await Spell.CastSpell("Defiance", Me, () => !Me.HasAura("Defiance"));
                  await Spell.CastSpell("Infuriate", Me, () => !Me.HasAura("Infuriated") && !Me.HasAura("Wrath") && !Me.HasAura("Wrath II") && !Me.HasAura("Wrath III") && !Me.HasAura("Wrath IV"));
                  await Spell.CastSpell("Storm's Eye", () => Actionmanager.LastSpell.Name == "Maim");
                  await Spell.CastSpell("Maim", () => !Me.HasAura("Maim", true, 7000) && !Me.CurrentTarget.HasAura("Storm's Eye", true, 7000) && Actionmanager.LastSpell.Name == "Heavy Swing");            
                  await Spell.CastSpell("Butcher's Block", () => Actionmanager.LastSpell.Name == "Skull Sunder");
                  await Spell.CastSpell("Skull Sunder", () => Actionmanager.LastSpell.Name == "Heavy Swing");
                  await Spell.CastSpell("Heavy Swing", () => true);
                      return false;
              }
              #endregion
      
      
          }
      }
      
      
      What is the command to add a hotkey to prioritize this rotation?
       
    5. dataruman

      dataruman New Member

      Joined:
      Apr 9, 2015
      Messages:
      9
      Likes Received:
      0
      Trophy Points:
      0
      What plugin are you using for combat assist? This works in kupo for pld. It has a DPS Lshift, Emnity Rshift. and a fallback rotation when no shift.

      Code:
            
              [Behavior(BehaviorType.Combat)]
              public Composite CreateBasicCombat()
              {
                  return new PrioritySelector(ctx => Core.Player.CurrentTarget as BattleCharacter,
                      new Decorator(ret => { 
      
      
                          if (KeyboardPolling.IsKeyDown(System.Windows.Forms.Keys.LShiftKey))
                              return true;
      
      
                          return false;
                      
                      }, new PrioritySelector(
      					        Spell.Cast("Goring Blade", r => Actionmanager.LastSpell.Name == "Riot Blade"),						
      					 	Spell.Cast("Royal Authority", r => Actionmanager.LastSpell.Name == "Savage Blade"),
      					 	Spell.Cast("Riot Blade", r => !Core.Player.CurrentTarget.HasAura("Goring Blade", true, 2400) && Actionmanager.LastSpell.Name == "Fast Blade"),
                                                      Spell.Cast("Savage Blade", r => Actionmanager.LastSpell.Name == "Fast Blade"),
      						Spell.Cast("Fast Blade", r => true)                  
                          )),
      
      
                      new Decorator(ret => { 
      
      
                          if (KeyboardPolling.IsKeyDown(System.Windows.Forms.Keys.RShiftKey))
                              return true;
      
      
                          return false;
                      
                      }, new PrioritySelector(
                                                      Spell.Cast("Mercy Stroke", r => Core.Player.CurrentTarget.CurrentHealthPercent <= 5),				
      						Spell.Cast("Rage of Halone", r =>  Actionmanager.LastSpell.Name == "Savage Blade"),
      						Spell.Cast("Shield Swipe", r => true),	
                                                      Spell.Cast("Savage Blade", r => Actionmanager.LastSpell.Name == "Fast Blade"),
      						Spell.Cast("Fast Blade", r => true)
                          )),
      					
      				new Decorator(ctx => ctx != null,
                          new PrioritySelector(
                              CommonBehaviors.MoveToLos(ctx => ctx as BattleCharacter),
                              CommonBehaviors.MoveAndStop(ctx => (ctx as BattleCharacter).Location, ctx => PullRange + (ctx as BattleCharacter).CombatReach, true, "Moving to unit"),
      						Spell.Cast("Mercy Stroke", r => Core.Player.CurrentTarget.CurrentHealthPercent <= 5),
      					        Spell.Cast("Goring Blade", r => Actionmanager.LastSpell.Name == "Riot Blade"),						
      						Spell.Cast("Rage of Halone", r => !Core.Player.CurrentTarget.HasAura("Strength Down") && Actionmanager.LastSpell.Name == "Savage Blade"),
      						Spell.Cast("Royal Authority", r => Actionmanager.LastSpell.Name == "Savage Blade"),
      						Spell.Cast("Rage of Halone", r => Actionmanager.LastSpell.Name == "Savage Blade"),
      						Spell.Cast("Savage Blade", r => !Core.Player.CurrentTarget.HasAura("Strength Down") && Actionmanager.LastSpell.Name == "Fast Blade"),
      					 	Spell.Cast("Riot Blade", r => !Core.Player.CurrentTarget.HasAura("Goring Blade", true, 2400) && Actionmanager.LastSpell.Name == "Fast Blade"),
                                                      Spell.Cast("Savage Blade", r => Actionmanager.LastSpell.Name == "Fast Blade"),
      						Spell.Cast("Shield Swipe", r => true),
      						Spell.Cast("Fast Blade", r => true)
       
                              )));
      
       
       
      Last edited: Jul 2, 2015
    6. Sodimm

      Sodimm Member

      Joined:
      Nov 8, 2014
      Messages:
      383
      Likes Received:
      7
      Trophy Points:
      18
      Try

      Code:
      [Behavior(BehaviorType.Combat)]
              public Composite CreateBasicCombat()
      		{
                  return new PrioritySelector(ctx => Core.Player.CurrentTarget as BattleCharacter,
      				new Decorator(ret => 
      					{
      						if (KeyboardPolling.IsKeyDown(System.Windows.Forms.Keys.LShiftKey))
      							return true;
      						
      						return false;
      					},
      					new PrioritySelector(
      						Spell.Cast("Butcher's Block",
      							reqs => Actionmanager.LastSpell.Name == "Skull Sunder"
      						),
      						Spell.Cast("Skull Sunder", 
      							reqs => Actionmanager.LastSpell.Name == "Heavy Swing"
      						),
      						Spell.Cast("Heavy Swing"
      						)                  
      					)
      				),
                      new Decorator(ret => 
      					{
      						if (KeyboardPolling.IsKeyDown(System.Windows.Forms.Keys.LControlKey))
      							return true;
      
      						return false;
      					},
      					new PrioritySelector(
      						Spell.Apply("Fracture"
      						),
      						Spell.Cast("Storm's Eye", 
      							reqs => !Core.Player.CurrentTarget.HasAura("Storm's Eye", true, msLeft:3000)
      										  && Actionmanager.LastSpell.Name == "Maim"
      						),
      						Spell.Cast("Storm's Path", 
      							reqs => !Core.Player.CurrentTarget.HasAura("Storm's Path", true, msLeft:3000)
      										  && Actionmanager.LastSpell.Name == "Maim"
      						),
      						Spell.Cast("Maim",
      							reqs => Actionmanager.LastSpell.Name == "Heavy Swing"
      						),
      						Spell.Cast("Heavy Swing"
      						)
                          )
      				),
      				new Decorator(ctx => ctx != null,
                          new PrioritySelector(
                              CommonBehaviors.MoveToLos(ctx => ctx as GameObject),
                              CommonBehaviors.MoveAndStop(ctx => (ctx as GameObject).Location, ctx => Core.Player.CombatReach + PullRange + (ctx as GameObject).CombatReach, true, "Moving to unit"),
      						
                              Spell.Apply("Fracture"
      						),
                              Spell.Apply("Defiance", 
      							on => Core.Player
      						),
                              Spell.Cast("Storm's Eye",
      							reqs => Actionmanager.LastSpell.Name == "Maim"
      						),
                              Spell.Cast("Butcher's Block", 
      							reqs => Actionmanager.LastSpell.Name == "Skull Sunder"
      						),
                              Spell.Cast("Maim", 
      							reqs=> Actionmanager.LastSpell.Name == "Heavy Swing"
      										 && !Core.Player.HasAura("Maim")
      						),
                              Spell.Cast("Skull Sunder", 
      							reqs => Actionmanager.LastSpell.Name == "Heavy Swing"
      						),
      						Spell.Cast("Heavy Swing"
      						)
                          )
      				)
      			);
              }
      
      Please bear in mind, i've just thrown this together at work without testing. But that's basically how it should be, if i've not made some cockup along the way.
       
    7. heinzskies

      heinzskies Member

      Joined:
      Sep 7, 2014
      Messages:
      57
      Likes Received:
      2
      Trophy Points:
      8
      You can take a look at my Dark Knight rotation, it should be in the main svn now. It uses shift to get the enmity rotation.
       

    Share This Page