Advertisement
Guest User

Untitled

a guest
May 6th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.49 KB | None | 0 0
  1. using LeagueSharp;
  2. using LeagueSharp.SDK;
  3. using LeagueSharp.SDK.Enumerations;
  4. using LeagueSharp.SDK.UI;
  5. using LeagueSharp.SDK.Utils;
  6. using System;
  7. using System.Drawing;
  8. using System.Linq;
  9. using System.Windows.Forms;
  10.  
  11. using Menu = LeagueSharp.SDK.UI.Menu;
  12.  
  13.  
  14. namespace _SDK_TroopAIO.Plugins
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21. {
  22. internal class Vladimir : Program
  23. {
  24.  
  25.  
  26. public static Spell Q, W, E, R;
  27. internal string comb = " ";
  28.  
  29. public Vladimir()
  30.  
  31. //Summoner Spells
  32. {
  33. Q = new Spell(SpellSlot.Q, 600);
  34. W = new Spell(SpellSlot.W);
  35. E = new Spell(SpellSlot.E, 600);
  36. R = new Spell(SpellSlot.E, 700);
  37.  
  38. Q.SetTargetted(0.25f, Q.Instance.SData.MissileSpeed);
  39. R.SetSkillshot(0.25f, 175, 700, false, SkillshotType.SkillshotCircle);
  40.  
  41. var Key = Menu.Add(new Menu("Key", "Key"));
  42. {
  43. Key.Add(new MenuKeyBind("Combo", "Combo", System.Windows.Forms.Keys.Space, KeyBindType.Press));
  44. Key.Add(new MenuKeyBind("Harass", "Harass", System.Windows.Forms.Keys.C, KeyBindType.Press));
  45. Key.Add(new MenuKeyBind("LaneClear", "LaneClear", System.Windows.Forms.Keys.V, KeyBindType.Press));
  46. }
  47.  
  48.  
  49. var Combo = Menu.Add(new Menu("Combo", "Combo"));
  50. {
  51.  
  52. Combo.Add(new MenuBool("UseQCombo", "Use Q", true));
  53.  
  54. Combo.Add(new MenuBool("UseWCombo", "Use W ", false));
  55.  
  56. Combo.Add(new MenuBool("UseECombo", "Use E", true));
  57.  
  58. Combo.Add(new MenuBool("UseRCombo", "Use R", true));
  59.  
  60. }
  61.  
  62. var Harass = Menu.Add(new Menu("Harass", "Harass"));
  63. {
  64. Harass.Add(new MenuBool("HarassUseQ", "Use Q", true));
  65. Harass.Add(new MenuBool("HarassUseE", "Use E", true));
  66. }
  67.  
  68. var LaneClear = Menu.Add(new Menu("LaneClear", "LaneClear"));
  69. {
  70. LaneClear.Add(new MenuBool("useqlc", "Use Q to laneclear", true));
  71. LaneClear.Add(new MenuBool("useelc", "Use E to laneclear", true));
  72. }
  73.  
  74. var Misc = Menu.Add(new Menu("Misc", "Misc"));
  75. {
  76. Misc.Add(new MenuBool("WGapClose", "Use W to anti-gaplcose", true));
  77. }
  78.  
  79. var Draw = Menu.Add(new Menu("Draw", "Draw"));
  80. {
  81. Draw.Add(new MenuBool("DrawQ", "Draw Q Range"));
  82. Draw.Add(new MenuBool("DrawW", "Draw W Range"));
  83. Draw.Add(new MenuBool("DrawE", "Draw E Range"));
  84. Draw.Add(new MenuBool("DrawR", "Draw R Range"));
  85. }
  86.  
  87. Game.OnUpdate += Game_OnUpdate;
  88. Drawing.OnDraw += Drawing_OnDraw;
  89. Events.OnGapCloser += OnGapCloser;
  90.  
  91. }
  92.  
  93. private void OnGapCloser(object oSender, Events.GapCloserEventArgs args)
  94. {
  95. try
  96. {
  97. if (Menu["Misc"]["WGapClose"].GetValue<MenuBool>() && W.IsReady())
  98. {
  99. W.Cast();
  100. }
  101. }
  102. catch (Exception ex)
  103. {
  104. Console.WriteLine(ex);
  105. }
  106. }
  107.  
  108. private void Game_OnUpdate(EventArgs args)
  109. {
  110. try
  111. {
  112. if (Me.IsDead)
  113. return;
  114.  
  115. if (Menu["Key"]["Combo"].GetValue<MenuKeyBind>().Active)
  116. {
  117. Combo();
  118. }
  119.  
  120. if (Menu["Key"]["Harass"].GetValue<MenuKeyBind>().Active)
  121. {
  122. Harass();
  123. }
  124.  
  125. if (Menu["Key"]["LaneClear"].GetValue<MenuKeyBind>().Active)
  126. {
  127. LaneClear();
  128. }
  129.  
  130. }
  131. catch (Exception ex)
  132. {
  133. Console.WriteLine(ex);
  134. }
  135. }
  136.  
  137. private void Combo()
  138. {
  139. var en = Variables.TargetSelector.GetTarget(1400, DamageType.Magical);
  140.  
  141. var ComboQ = Menu["Combo"]["UseQCombo"].GetValue<MenuBool>();
  142. var ComboW = Menu["Combo"]["UseWCombo"].GetValue<MenuBool>();
  143. var ComboE = Menu["Combo"]["UseECombo"].GetValue<MenuBool>();
  144. var ComboR = Menu["Combo"]["UseRCombo"].GetValue<MenuBool>();
  145.  
  146. if (ComboQ && Q.IsReady() && en.IsValidTarget(Q.Range))
  147. {
  148. Q.Cast(en);
  149. }
  150.  
  151. if (ComboE && E.IsReady() && en.IsValidTarget(750))
  152. {
  153. E.StartCharging(Game.CursorPos);
  154. }
  155.  
  156. if (ComboW && W.IsReady() && en.IsValidTarget(Q.Range))
  157. {
  158. W.Cast(en);
  159. }
  160.  
  161. if (ComboR && R.IsReady() && en.IsValidTarget(R.Range))
  162. {
  163. var pred = R.GetPrediction(en);
  164. if (pred.Hitchance >= HitChance.VeryHigh)
  165. {
  166. R.Cast(pred.CastPosition);
  167. }
  168. }
  169. }
  170.  
  171.  
  172. private void Harass()
  173. {
  174. var HarassTarget = Variables.TargetSelector.GetTarget(750, DamageType.Magical);
  175. var HarassQ = Menu["Harass"]["HarassUseQ"].GetValue<MenuBool>();
  176. var HarassE = Menu["Harass"]["HarassUseE"].GetValue<MenuBool>();
  177.  
  178. if (HarassQ && Q.IsReady() && HarassTarget.IsValidTarget(Q.Range))
  179. {
  180. Q.Cast(HarassTarget);
  181. }
  182.  
  183. if (HarassE && E.IsReady() && HarassTarget.IsValidTarget(750))
  184. {
  185. E.StartCharging(Game.CursorPos);
  186. }
  187. }
  188.  
  189. private void LaneClear()
  190. {
  191. try
  192. {
  193. var m = Q.GetLineFarmLocation(GameObjects.EnemyMinions.Where(min => min.Team != GameObjectTeam.Neutral && min.IsValidTarget(E.Range)).ToList(), Q.Width);
  194. if (Menu["Key"]["LaneClear"].GetValue<MenuKeyBind>().Active)
  195. {
  196.  
  197. if (Menu["LaneClear"]["useqlc"].GetValue<MenuBool>() && Q.IsReady())
  198. {
  199. Q.Cast(m.Position);
  200. }
  201. if (Menu["LaneClear"]["useelc"].GetValue<MenuBool>() && E.IsReady())
  202. {
  203. E.Cast(m.Position);
  204. }
  205. }
  206. }
  207. catch (Exception ex)
  208. {
  209. Console.WriteLine(ex);
  210. }
  211. }
  212.  
  213. private void Drawing_OnDraw(EventArgs args)
  214. {
  215. try
  216. {
  217. if (Me.IsDead)
  218. return;
  219.  
  220. if (Q.IsReady() && Menu["Draw"]["DrawQ"].GetValue<MenuBool>())
  221. Render.Circle.DrawCircle(Me.Position, Q.Range, System.Drawing.Color.AliceBlue);
  222.  
  223. if (W.IsReady() && Menu["Draw"]["DrawW"].GetValue<MenuBool>())
  224. Render.Circle.DrawCircle(Me.Position, W.Range, System.Drawing.Color.AliceBlue);
  225.  
  226. if (E.IsReady() && Menu["Draw"]["DrawE"].GetValue<MenuBool>())
  227. Render.Circle.DrawCircle(Me.Position, E.Range, System.Drawing.Color.AliceBlue);
  228.  
  229. if (R.IsReady() && Menu["Draw"]["DrawR"].GetValue<MenuBool>())
  230. Render.Circle.DrawCircle(Me.Position, E.Range, System.Drawing.Color.AliceBlue);
  231. }
  232. catch (Exception ex)
  233. {
  234. Console.WriteLine(ex);
  235. }
  236. }
  237. }
  238. }
  239. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement