Exemple #1
0
 public void Execute()
 {
     if (!hasArmlet())
     {
         return;
     }
     this.armletToggler = new ArmletToggler(me.FindItem("item_armlet"));
     if (me.IsAttacking() && Heroes.GetByTeam(Variables.EnemyTeam)
         .Any(x => x.IsValid && x.IsAlive && x.IsVisible &&
              x.Distance2D(Variables.Hero) < x.GetAttackRange() + 200))
     {
         if (Utils.SleepCheck("TurnOn"))
         {
             armletToggler.TurnOn();
             Utils.Sleep(1000, "TurnOn");
         }
     }
     if (me.Health > thresholdHP)
     {
         return;
     }
     if (armletToggler.CanToggle)
     {
         if (Utils.SleepCheck("toggle"))
         {
             armletToggler.Toggle();
             Utils.Sleep(1000, "toggle");
         }
     }
 }
Exemple #2
0
 public void Update()
 {
     if (!hasArmlet())
     {
         return;
     }
     this.armletToggler = new ArmletToggler(me.FindItem("item_armlet"));
 }