Advertisement
Guest User

Keppo insec

a guest
Jul 1st, 2015
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 7.89 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. using SharpDX;
  9.  
  10. namespace KeppoInsec
  11. {
  12.     public static class Insec
  13.     {
  14.         public static int SecondQTime = new int();
  15.         private static bool da;
  16.         private static bool beforeall=true;
  17.         public static string InsecMode = "Normal";
  18.         public static string Steps = "One";
  19.         public static Obj_AI_Hero insecAlly;
  20.         public static Obj_AI_Hero insecEnemy;
  21.         public static void updateInsec()
  22.         {
  23.             if(Program.menu.Item("OrbwalkInsec").GetValue<bool>())
  24.             Program.Player.IssueOrder(GameObjectOrder.MoveTo, Program.Player.Position.Extend(Game.CursorPos, 150));
  25.             if (!Program.R.IsReady()) return;
  26.             var target = TargetSelector.GetTarget(1300, TargetSelector.DamageType.Physical);
  27.             InsecQMode(target);
  28.         }
  29.         public static void updateInsecFlash()
  30.         {
  31.             var target = TargetSelector.GetTarget(1300, TargetSelector.DamageType.Physical);
  32.             InsecFlashR(target);
  33.         }
  34.         public static string fiveornot()
  35.         {
  36.             return !Program.Player.IsDashing() ? Steps = "Five" : Steps;
  37.         }
  38.  
  39.         public static void InsecQMode(Obj_AI_Hero target)
  40.         {
  41.             if(beforeall==false)
  42.             {
  43.                 if (Program.Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name == "BlindMonkQOne")
  44.                 {
  45.                     Steps = "One";
  46.                 }
  47.                 else if (Program.Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name == "blindmonkqtwo")
  48.                 {
  49.                     Steps = "Two";
  50.                 }
  51.                 else
  52.                 {
  53.                     Steps = "Three";
  54.                 }
  55.                 beforeall = true;
  56.             }
  57.  
  58.             if (target.IsValidTarget(Program.Q.Range))
  59.             {
  60.                 if (Steps == "One" ) //First hit q
  61.                 {
  62.                  if(   Program.W.IsInRange(target.Position+50))
  63.                  {
  64.                      Steps = "Three";
  65.                  }
  66.                  else{
  67.                     if (Program.Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name == "BlindMonkQOne")
  68.                     {
  69.                         if(Program.Q.CastIfHitchanceEquals(target, Program.HitchanceCheck(Program.menu.Item("seth").GetValue<Slider>().Value)))
  70.                         Steps = "Two";
  71.                     }
  72.                  }
  73.                 }
  74.                 else if (Steps == "Two") // hit second q
  75.                 {
  76.                     if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name == "blindmonkqtwo")
  77.                     {
  78.                         SecondQTime = Convert.ToInt32(Math.Round(Game.Ping + Program.Q.Instance.SData.SpellTotalTime, MidpointRounding.AwayFromZero));
  79.                         if (Program.Q.Cast())
  80.                         {
  81.                             if (!WardJump.getBestWardItem().IsValidSlot() && Program.menu.Item("useflash").GetValue<bool>())
  82.                             {
  83.                                
  84.                                 //Steps = "TrickR";
  85.                                 Steps = "Flash";
  86.                             }
  87.                             else
  88.                             {
  89.                                 Steps = "Three";
  90.                             }
  91.                         }
  92.  
  93.                     }
  94.                     else {
  95.                      //   Steps = "One";
  96.                     }
  97.                 }
  98.                 else if (Steps == "Three") // put ward
  99.                 {
  100.                     if (Program.Player.Distance(WardJump.getward(target)) <= 600 && Program.W.IsReady())
  101.                     {
  102.                         Utility.DelayAction.Add(SecondQTime, () => WardJump.InsecJump(GetInsecPos(target).To2D()));
  103.                         Steps = "Four";
  104.                     }
  105.                 }
  106.                 else if (Steps == "Four")  //go to the ward
  107.                 {
  108.                     Utility.DelayAction.Add(Game.Ping + 100, () => WardJump.InsecJump(GetInsecPos(target).To2D()));
  109.                     Utility.DelayAction.Add(Game.Ping + 110, () => fiveornot());
  110.                 }
  111.                 else if (Steps == "Flash") // hit w
  112.                 {
  113.                     if (WardJump.Insecpos(target).Distance(Program.Player.Position) < 400)
  114.                     {
  115.                         ObjectManager.Player.Spellbook.CastSpell(ObjectManager.Player.GetSpellSlot("SummonerFlash"), GetInsecPos(target));
  116.                         Steps = "Five";
  117.                     }
  118.                 }
  119.                     else if(Steps == "TrickR") //truco de flash
  120.                 {
  121.                     if (WardJump.Insecpos(target).Distance(Program.Player.Position) < 375)
  122.                     {
  123.                         if (Program.R.CastOnUnit(target))
  124.                         {
  125.                             Steps = "TrickFlash";
  126.                         }
  127.                     }
  128.                 }
  129.                 else if (Steps == "TrickFlash") //truco de flash
  130.                 {
  131.                     if (WardJump.Insecpos(target).Distance(Program.Player.Position) < 375)
  132.                     {
  133.                         Utility.DelayAction.Add(Game.Ping + 125, () => ObjectManager.Player.Spellbook.CastSpell(ObjectManager.Player.GetSpellSlot("SummonerFlash"), GetInsecPos(target)));
  134.                         Steps = "One";
  135.                     }
  136.                 }
  137.                 else if (Steps == "Five" &&  !Program.W.Cast()) // and hit the kick
  138.                 {
  139.                     Utility.DelayAction.Add(Convert.ToInt32(Math.Round(Game.Ping + Program.W.Instance.SData.SpellTotalTime, MidpointRounding.AwayFromZero)), () => Program.R.CastOnUnit(target));// it dont hit anything
  140.                     Steps = "One";
  141.                 }
  142.                 else {
  143.                   /*  if (Program.Q.IsReady())
  144.                     {
  145.                      //   Steps = "One";
  146.                     }
  147.                     else if(Program.W.IsReady())
  148.                     {
  149.                       //  Steps = "Three";
  150.                     }
  151.                     else
  152.                     {*/
  153.                         Steps = "One";
  154.                  //   }
  155.                 }
  156.             }
  157.         }
  158.  
  159.         public static Vector3 GetInsecPos(Obj_AI_Hero target)
  160.         {
  161.             if (Program.menu.Item("Mode").GetValue<StringList>().SelectedIndex == 0)
  162.             {
  163.                 return WardJump.InsecposTower(target); // insec torre
  164.               //  Game.PrintChat("");
  165.             }
  166.             else if (Program.menu.Item("Mode").GetValue<StringList>().SelectedIndex == 1)
  167.             {
  168.                 return WardJump.InsecposToAlly(insecEnemy,insecAlly); //insec ally  
  169.             }
  170.             else if (Program.menu.Item("Mode").GetValue<StringList>().SelectedIndex == 2)
  171.             {
  172.                 return WardJump.Insecpos(target); // insec normal
  173.             }
  174.  
  175.             return WardJump.Insecpos(target);
  176.         }
  177.         public static void InsecFlashR(Obj_AI_Hero target)
  178.         {
  179.            Program.Player.IssueOrder(GameObjectOrder.MoveTo, Program.Player.Position.Extend(Game.CursorPos, 150));
  180.             if(MasterOfInsec.Program.R.IsReady())
  181.             if (WardJump.Insecpos(target).Distance(Program.Player.Position) < 375)
  182.             {
  183.                 Program.R.CastOnUnit(target);
  184.                 Utility.DelayAction.Add(Game.Ping + 125, () => ObjectManager.Player.Spellbook.CastSpell(ObjectManager.Player.GetSpellSlot("SummonerFlash"), WardJump.Insecpos(target)));
  185.             }
  186.  
  187.         }
  188.         public static void ResetInsecStats()
  189.         {
  190.        //     beforeall = false;
  191.             Steps = "One";
  192.         }
  193.     }
  194. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement