FineNerds

Soraka Heal

Feb 20th, 2015
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.06 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using LeagueSharp;
  7. using LeagueSharp.Common;
  8.  
  9. namespace Soraka
  10. {
  11.     class Actions
  12.     {
  13.         private static Obj_AI_Hero Player = ObjectManager.Player;
  14.  
  15.         public static void ManaManager()
  16.         {
  17.             float heal = 50f;
  18.             float combo = 30f;
  19.             float harass = 20f;
  20.         }
  21.  
  22.         public static void combo()
  23.         {
  24.         }
  25.  
  26.         public static void harass()
  27.         {
  28.         }
  29.  
  30.         #region Heal Self
  31.         public static void healSelf()
  32.         {
  33.             var heal = Player.GetSpellSlot("summonerheal");
  34.  
  35.             if (heal == SpellSlot.Unknown || Player.Spellbook.CanUseSpell(heal) != SpellState.Ready)
  36.                 return;
  37.             if (Player.HasBuff("Recall") || Utility.InFountain(Player))
  38.                 return;
  39.             if(MenuInstance._menu.Item("healSelf").GetValue<bool>() && (Player.Health / Player.MaxHealth) * 100 <= MenuInstance._menu.Item("healSelfPercent").GetValue<Slider>().Value)
  40.                 Player.Spellbook.CastSpell(heal);
  41.         }
  42.         #endregion
  43.  
  44.         #region Heal Allies
  45.         public static void healAlly()
  46.         {
  47.             var heal = Player.GetSpellSlot("summonerheal");
  48.  
  49.             if (heal == SpellSlot.Unknown || Player.Spellbook.CanUseSpell(heal) != SpellState.Ready)
  50.                 return;
  51.             foreach (var player in ObjectManager.Get<Obj_AI_Hero>().Where(p => p.IsAlly && !p.IsMe))
  52.             {
  53.                 if (Player.HasBuff("Recall") || Utility.InFountain(Player))
  54.                     return;
  55.  
  56.                 if (MenuInstance._menu.Item("healAlly").GetValue<bool>() && (player.Health / player.MaxHealth) * 100 <= MenuInstance._menu.Item("healAllyPercent").GetValue<Slider>().Value && Player.ManaPercentage() >= MenuInstance._menu.Item("minimMana").GetValue<Slider>().Value && Program._w.IsReady() && player.Distance(Player.ServerPosition) <= Program._w.Range)
  57.                     Program._w.Cast(player);
  58.                 if (MenuInstance._menu.Item("healAlly").GetValue<bool>() && (player.Health / player.MaxHealth) * 100 <= MenuInstance._menu.Item("healAllyPercent").GetValue<Slider>().Value && !Program._w.IsReady() && player.Distance(Player.ServerPosition) <= 400)
  59.                     Player.Spellbook.CastSpell(heal);
  60.                 if (MenuInstance._menu.Item("healAlly").GetValue<bool>() && (player.Health / player.MaxHealth) * 100 <= MenuInstance._menu.Item("healAllyPercent").GetValue<Slider>().Value && !Program._w.IsReady())
  61.                 {
  62.                     if (player.Distance(Player.ServerPosition) > 400 || !heal.IsReady())
  63.                     {
  64.                         if (Program._r.IsReady())
  65.                             Program._r.Cast(Player);
  66.                     }
  67.                     else if (player.Distance(Player.ServerPosition) <= 400 && heal.IsReady())
  68.                         Player.Spellbook.CastSpell(heal);
  69.                 }
  70.             }
  71.         }
  72.         #endregion
  73.     }
  74. }
Advertisement
Add Comment
Please, Sign In to add comment