forked from centilmen50/Easy-Annie
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
330 lines (288 loc) · 13.1 KB
/
Copy pathProgram.cs
File metadata and controls
330 lines (288 loc) · 13.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
using System;
using System.Linq;
using System.Threading.Tasks;
using System.Reflection;
using System.Collections.Generic;
using EloBuddy;
using EloBuddy.SDK;
using EloBuddy.SDK.Enumerations;
using EloBuddy.SDK.Events;
using EloBuddy.SDK.Menu;
using EloBuddy.SDK.Menu.Values;
using EloBuddy.SDK.Rendering;
using Color = System.Drawing.Color;
using SharpDX;
using System.Net;
using System.Text.RegularExpressions;
namespace EasyAnnie
{
class Program
{
public static Spell.Targeted Q;
public static Spell.Skillshot W;
public static Spell.Active E;
public static Spell.Skillshot R;
public static Menu Menu, FarmingMenu, MiscMenu, DrawMenu, ComboMenu;
public static List<string> DodgeSpells = new List<string>() { "KatarinaR", "ViR", "NamiR", "xerathrmissilewrapper" };
static Item Healthpot;
static Item Manapot;
static Item CrystalFlask;
static Item CorruptingPotion;
static Item RefillablePotion;
static Item Biscuit;
static Item Biscuit2;
static Item Zhonya;
static void Main(string[] args)
{
Loading.OnLoadingComplete += Loading_OnLoadingComplete;
}
public static AIHeroClient _Player
{
get { return ObjectManager.Player; }
}
private static void Loading_OnLoadingComplete(EventArgs args)
{
if (Player.Instance.ChampionName != "Annie")
return;
Bootstrap.Init(null);
Healthpot = new Item(2003, 0);
Manapot = new Item(2004, 0);
CrystalFlask = new Item(2041, 0);
CorruptingPotion = new Item(2033, 0);
RefillablePotion = new Item(2031, 0);
Biscuit = new Item(2009, 0);
Biscuit2 = new Item(2010, 0);
Zhonya = new Item(3157, 0);
Q = new Spell.Targeted(SpellSlot.Q, 625);
W = new Spell.Skillshot(SpellSlot.W, 625, SkillShotType.Cone, 250, 1600, 50);
E = new Spell.Active(SpellSlot.E);
R = new Spell.Skillshot(SpellSlot.R, 600, SkillShotType.Circular, 250, 2000, 200);
Menu = MainMenu.AddMenu("Easy Annie", "easyannie");
ComboMenu = Menu.AddSubMenu("Combo","ComboSettings");
ComboMenu.AddLabel("Combo Settings");
ComboMenu.Add("Auto Ignite", new CheckBox("Auto Ignite",false));
ComboMenu.Add("Save Stun", new CheckBox("Save Stun",false));
ComboMenu.Add("R Count", new Slider("Min R Count >= ", 2, 1, 5));
FarmingMenu = Menu.AddSubMenu("Farm", "FarmSettings");
FarmingMenu.AddLabel("Lane Clear");
FarmingMenu.Add("QLaneClear", new CheckBox("Use Q"));
FarmingMenu.Add("WLaneClear", new CheckBox("Use W"));
FarmingMenu.AddLabel("Last Hit");
FarmingMenu.Add("Qlasthit", new CheckBox("Use Q"));
MiscMenu = Menu.AddSubMenu("Misc", "Misc");
MiscMenu.AddLabel("KillSteal");
MiscMenu.Add("Qkill", new CheckBox("Use Q"));
MiscMenu.Add("Wkill", new CheckBox("Use W"));
MiscMenu.Add("Rkill", new CheckBox("Use R"));
MiscMenu.AddLabel("Activator");
MiscMenu.Add("useHP", new CheckBox("Use Health Potion"));
MiscMenu.Add("useHPV", new Slider("HP < %", 45, 0, 100));
MiscMenu.Add("useMana", new CheckBox("Use Mana Potion"));
MiscMenu.Add("useManaV", new Slider("Mana < %", 45, 0, 100));
MiscMenu.Add("useCrystal", new CheckBox("Use New Potions"));
MiscMenu.Add("useCrystalHPV", new Slider("HP < %", 45, 0, 100));
MiscMenu.Add("useCrystalManaV", new Slider("Mana < %", 45, 0, 100));
MiscMenu.Add("useZhonya", new CheckBox("Use Zhonya"));
DrawMenu = Menu.AddSubMenu("Draw", "Drawings");
DrawMenu.Add("drawAA", new CheckBox("Draw AA"));
DrawMenu.Add("drawQ", new CheckBox("Draw Q"));
DrawMenu.Add("drawE", new CheckBox("Draw W"));
DrawMenu.Add("drawR", new CheckBox("Draw R"));
Game.OnTick += Game_OnTick;
Drawing.OnDraw += Drawing_OnDraw;
AIHeroClient.OnProcessSpellCast += AIHeroClient_OnProcessSpellCast;
}
static void AIHeroClient_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
if (DodgeSpells.Any(el => el == args.SData.Name))
{
if (Q.IsReady() && Q.IsInRange(sender) && _Player.HasBuff("pyromania_particle"))
{
Q.Cast(sender);
}
else if (R.IsReady() && R.IsInRange(sender) && _Player.HasBuff("pyromania_particle"))
{
R.Cast(sender);
}
}
}
private static void Game_OnTick(EventArgs args)
{
var HPpot = MiscMenu["useHP"].Cast<CheckBox>().CurrentValue;
var Mpot = MiscMenu["useMana"].Cast<CheckBox>().CurrentValue;
var Crystal = MiscMenu["useCrystal"].Cast<CheckBox>().CurrentValue;
var HPv = MiscMenu["useHPv"].Cast<Slider>().CurrentValue;
var Manav = MiscMenu["useManav"].Cast<Slider>().CurrentValue;
var CrystalHPv = MiscMenu["useCrystalHPv"].Cast<Slider>().CurrentValue;
var CrystalManav = MiscMenu["useCrystalManav"].Cast<Slider>().CurrentValue;
var igntarget = TargetSelector.GetTarget(600, DamageType.True);
if (HPpot && Player.Instance.HealthPercent < HPv)
{
if (Item.HasItem(Healthpot.Id) && Item.CanUseItem(Healthpot.Id) && !Player.HasBuff("RegenerationPotion"))
{
Healthpot.Cast();
}
if (Item.HasItem(Biscuit.Id) && Item.CanUseItem(Biscuit.Id) && !Player.HasBuff("RegenerationPotion"))
{
Biscuit.Cast();
}
if (Item.HasItem(Biscuit2.Id) && Item.CanUseItem(Biscuit2.Id) && !Player.HasBuff("RegenerationPotion"))
{
Biscuit2.Cast();
}
}
if (Crystal && Player.Instance.HealthPercent < CrystalHPv || Crystal && Player.Instance.ManaPercent < CrystalManav)
{
if (Item.HasItem(CorruptingPotion.Id) && Item.CanUseItem(CorruptingPotion.Id) && !Player.HasBuff("RegenerationPotion") && !Player.HasBuff("FlaskOfCrystalWater") && !Player.HasBuff("ItemCrystalFlask"))
{
CorruptingPotion.Cast();
}
}
if (Crystal && Player.Instance.HealthPercent < CrystalHPv || Crystal && Player.Instance.ManaPercent < CrystalManav)
{
if (Item.HasItem(RefillablePotion.Id) && Item.CanUseItem(RefillablePotion.Id) && !Player.HasBuff("RegenerationPotion") && !Player.HasBuff("FlaskOfCrystalWater") && !Player.HasBuff("ItemCrystalFlask"))
{
RefillablePotion.Cast();
}
}
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
{
Combo();
}
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
{
Harass();
}
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
{
LaneClear();
}
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit))
{
LastHit();
}
KillSteal();
Auto();
}
static void Auto()
{
var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
foreach (AIHeroClient enemie in EntityManager.Heroes.Enemies)
{
if (Player.Instance.IsDead || !Player.Instance.CanCast || Player.Instance.IsInvulnerable || !Player.Instance.IsTargetable || Player.Instance.IsZombie || Player.Instance.IsInShopRange())
{
return;
}
else if (Player.Instance.HealthPercent < 10 && EntityManager.Heroes.Enemies.Where(enemy => enemy != _Player && enemy.Distance(_Player) <= 800).Count() >= 1 && !target.IsDead && !target.IsZombie && enemie.CanCast)
{
Zhonya.Cast();
}
}
}
private static void Combo()
{
var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
var rCount = ComboMenu["R Count"].Cast<Slider>().CurrentValue;
if (Q.IsReady() && target.IsValidTarget(Q.Range) && !target.IsDead)
{
Q.Cast(target);
}
if (W.IsReady() && target.IsValidTarget(W.Range) && !target.IsDead)
{
W.Cast(target);
}
if (E.IsReady() && target.IsValidTarget(Q.Range))
{
E.Cast();
}
foreach (AIHeroClient enemie in EntityManager.Heroes.Enemies)
{
if (R.IsReady() && EntityManager.Heroes.Enemies.Where(enemy => enemy != _Player && enemy.Distance(_Player) <= R.Range).Count() >= rCount && !target.IsDead)
{
R.Cast(enemie);
}
}
}
private static void KillSteal()
{
var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
var useQ = MiscMenu["Qkill"].Cast<CheckBox>().CurrentValue;
var useW = MiscMenu["Wkill"].Cast<CheckBox>().CurrentValue;
var useR = MiscMenu["Rkill"].Cast<CheckBox>().CurrentValue;
if (Q.IsReady() && useQ && target.IsValidTarget(Q.Range) && target.Health <= _Player.GetSpellDamage(target, SpellSlot.Q))
{
Q.Cast(target);
}
if (W.IsReady() && useW && target.IsValidTarget(W.Range) && target.Health <= _Player.GetSpellDamage(target, SpellSlot.W))
{
W.Cast(target);
}
if (R.IsReady() && useR && target.IsValidTarget(R.Range) && target.Health <= _Player.GetSpellDamage(target, SpellSlot.R))
{
R.Cast(target);
}
}
private static void Harass()
{
var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
if (Q.IsReady() && target.IsValidTarget(Q.Range) && !target.IsDead )
{
Q.Cast(target);
}
}
private static void LaneClear()
{
var stun = ComboMenu["Save Stun"].Cast<CheckBox>().CurrentValue;
if (stun && _Player.HasBuff("pyromania_particle"))
{
return;
}
var useQ = FarmingMenu["QLaneClear"].Cast<CheckBox>().CurrentValue;
var useW = FarmingMenu["WLaneClear"].Cast<CheckBox>().CurrentValue;
var minions = ObjectManager.Get<Obj_AI_Base>().OrderBy(m => m.Health).Where(m => m.IsMinion && m.IsEnemy && !m.IsDead);
foreach (var minion in minions)
{
if (useQ && Q.IsReady() && minion.IsValidTarget(Q.Range) && minion.Health < _Player.GetSpellDamage(minion, SpellSlot.Q))
{
Q.Cast(minion);
}
if (useW && W.IsReady() && Player.Instance.ManaPercent > 35 && minion.IsValidTarget(W.Range) && minions.Count() >= 3)
{
W.Cast(minion);
}
}
}
private static void LastHit()
{
var stun = ComboMenu["Save Stun"].Cast<CheckBox>().CurrentValue;
if (stun && _Player.HasBuff("pyromania_particle"))
{
return;
}
var useQ = FarmingMenu["Qlasthit"].Cast<CheckBox>().CurrentValue;
var minions = ObjectManager.Get<Obj_AI_Base>().OrderBy(m => m.Health).Where(m => m.IsMinion && m.IsEnemy && !m.IsDead);
foreach (var minion in minions)
{
if (useQ && Q.IsReady() && minion.IsValidTarget(Q.Range) && minion.Health < _Player.GetSpellDamage(minion, SpellSlot.Q))
{
Q.Cast(minion);
}
}
}
private static void Drawing_OnDraw(EventArgs args)
{
if (DrawMenu["drawQ"].Cast<CheckBox>().CurrentValue)
{
new Circle() { Color = Color.Red, BorderWidth = 1, Radius = Q.Range }.Draw(_Player.Position);
}
if (DrawMenu["drawW"].Cast<CheckBox>().CurrentValue)
{
new Circle() { Color = Color.Red, BorderWidth = 1, Radius = W.Range }.Draw(_Player.Position);
}
if (DrawMenu["drawR"].Cast<CheckBox>().CurrentValue)
{
new Circle() { Color = Color.Red, BorderWidth = 1, Radius = R.Range }.Draw(_Player.Position);
}
}
}
}