-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
289 lines (262 loc) · 12.5 KB
/
Program.cs
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
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
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 SharpDX;
using Color = System.Drawing.Color;
namespace ClownRiven
{
internal class Program
{
public static Menu Menu, ComboMenu, HarassMenu, MinionClear, Jungle, DrawMenu, HumanizerMenu;
public static Text Text = new Text("", new Font(FontFamily.GenericSansSerif, 9, FontStyle.Bold));
public static DamageIndicator.DamageIndicator Indicator;
public static Spell.Skillshot R2;
public static bool IsRActive
{
get { return ComboMenu["useR"].Cast<KeyBind>().CurrentValue; }
}
public static bool BurstActive
{
get { return ComboMenu["burst"].Cast<KeyBind>().CurrentValue; }
}
private static void Main(string[] args)
{
Loading.OnLoadingComplete += Loading_OnLoadingComplete;
}
private static void Loading_OnLoadingComplete(EventArgs args)
{
if (Player.Instance.Hero != Champion.Riven) return;
Menu = MainMenu.AddMenu("ClownRiven", "ClownRiven");
Menu.AddGroupLabel("Clown Riven");
Menu.AddSeparator();
Menu.AddLabel("Made by: MrClown");
Menu.AddLabel("HU3 > USA");
Menu.AddLabel("Never Be Alone");
ComboMenu = Menu.AddSubMenu("Settings ", "combosettingsRiven");
ComboMenu.AddGroupLabel("Combo Settings");
ComboMenu.Add("combo.useQGapClose", new CheckBox("Use Q to Gapclose", false));
ComboMenu.Add("combo.useQ", new CheckBox("Use Q"));
ComboMenu.Add("combo.useW", new CheckBox("Use W"));
ComboMenu.Add("combo.useE", new CheckBox("Use E"));
ComboMenu.Add("combo.useR", new CheckBox("Use R"));
ComboMenu.Add("combo.useR2", new CheckBox("Use R2"));
ComboMenu.Add("combo.hydra", new CheckBox("Use Hydra and Tiamat"));
ComboMenu.Add("useR", new KeyBind("Force R", false, KeyBind.BindTypes.PressToggle, 'T'));
ComboMenu.AddSeparator();
ComboMenu.AddLabel("R1 Combos");
ComboMenu.Add("combo.eR1", new CheckBox("E -> R1"));
ComboMenu.Add("combo.R1", new CheckBox("R1"));
ComboMenu.AddSeparator();
ComboMenu.AddLabel("R2 Combos");
ComboMenu.Add("combo.eR2", new CheckBox("E -> R2"));
ComboMenu.Add("combo.qR2", new CheckBox("R2 -> Q"));
ComboMenu.Add("combo.R2", new CheckBox("R2"));
ComboMenu.AddSeparator();
ComboMenu.AddGroupLabel("Burst Combo");
ComboMenu.Add("burst.flash", new CheckBox("Use Flash in Burst"));
ComboMenu.Add("burst", new KeyBind("Burst", false, KeyBind.BindTypes.HoldActive, 'Y'));
ComboMenu.AddSeparator();
ComboMenu.AddGroupLabel("Etc");
ComboMenu.Add("combo.keepQAlive", new CheckBox("Keep Q"));
ComboMenu.Add("combo.useRBeforeExpire", new CheckBox("Auto R in off"));
ComboMenu.Add("combo.alwaysCancelQ", new CheckBox("Cancel Q", false));
HarassMenu = Menu.AddSubMenu("Harass", "harasssettingsRiven");
HarassMenu.AddGroupLabel("Harass Settings");
HarassMenu.Add("harass.hydra", new CheckBox("Use Hydra & Tiamat"));
HarassMenu.Add("harass.useQ", new CheckBox("Use Q"));
HarassMenu.Add("harass.useW", new CheckBox("Use W"));
HarassMenu.Add("harass.useE", new CheckBox("Use E"));
MinionClear = Menu.AddSubMenu("LClear Settings", "farmettingsRiven");
MinionClear.AddGroupLabel("LastHit Settings");
MinionClear.Add("lasthit.useQ", new CheckBox("Use Q"));
MinionClear.Add("lasthit.useW", new CheckBox("Use W"));
MinionClear.AddSeparator();
MinionClear.AddGroupLabel("Wave Clear Settings");
MinionClear.Add("waveclear.hydra", new CheckBox("Use Hydra & Tiamat"));
MinionClear.Add("waveclear.useQ", new CheckBox("Use Q"));
MinionClear.Add("waveclear.useW", new CheckBox("Use W"));
Jungle = Menu.AddSubMenu("Jungle Settings", "jungleettingsRiven");
Jungle.AddGroupLabel("Jungle Clear Settings");
Jungle.Add("jungle.hydra", new CheckBox("Use Hydra/Tiamat"));
Jungle.Add("jungle.useQ", new CheckBox("Use Q"));
Jungle.Add("jungle.useW", new CheckBox("Use W"));
Jungle.Add("jungle.useE", new CheckBox("Use E"));
DrawMenu = Menu.AddSubMenu("Draw Settings", "drawsettingsRiven");
DrawMenu.AddGroupLabel("Draw Settings");
DrawMenu.Add("draw.Q", new CheckBox("Draw Q", false));
DrawMenu.Add("draw.W", new CheckBox("Draw W", false));
DrawMenu.Add("draw.E", new CheckBox("Draw E", false));
DrawMenu.Add("draw.R", new CheckBox("Draw R", false));
DrawMenu.Add("draw.Damage", new CheckBox("Draw Damage"));
DrawMenu.Add("draw.Combo", new CheckBox("Write Current Combo", false));
DrawMenu.Add("draw.rState", new CheckBox("Write R State"));
HumanizerMenu = Menu.AddSubMenu("Humanizer Settings");
HumanizerMenu.Add("humanizerQSlow", new Slider("Humanizer Q Slow", 0, 0, 200));
R2 = new Spell.Skillshot(SpellSlot.R, 900, SkillShotType.Cone, 250, 1600, 125);
States.Flash = Player.Spells.FirstOrDefault(a => a.SData.Name == "summonerflash");
Queuer.Tiamat =
ObjectManager.Player.InventoryItems.FirstOrDefault(
a => a.Id == ItemId.Tiamat_Melee_Only || a.Id == ItemId.Ravenous_Hydra_Melee_Only);
SpellEvents.Init();
Drawing.OnDraw += Drawing_OnDraw;
Player.OnIssueOrder += Player_OnIssueOrder;
Indicator = new DamageIndicator.DamageIndicator();
Shop.OnBuyItem += Shop_OnBuyItem;
Shop.OnSellItem += Shop_OnSellItem;
Shop.OnUndo += Shop_OnUndo;
Player.OnSwapItem += Player_OnSwapItem;
Game.OnUpdate += Game_OnUpdate;
}
private static void Player_OnSwapItem(AIHeroClient sender, PlayerSwapItemEventArgs args)
{
if (!sender.IsMe) return;
Queuer.Tiamat =
ObjectManager.Player.InventoryItems.FirstOrDefault(
a => a.Id == ItemId.Tiamat_Melee_Only || a.Id == ItemId.Ravenous_Hydra_Melee_Only);
}
private static void Shop_OnUndo(ShopUndoPurchaseEventArgs args)
{
Queuer.Tiamat =
ObjectManager.Player.InventoryItems.FirstOrDefault(
a => a.Id == ItemId.Tiamat_Melee_Only || a.Id == ItemId.Ravenous_Hydra_Melee_Only);
}
private static void Shop_OnSellItem(AIHeroClient sender, ShopActionEventArgs args)
{
if (!sender.IsMe) return;
Queuer.Tiamat =
ObjectManager.Player.InventoryItems.FirstOrDefault(
a => a.Id == ItemId.Tiamat_Melee_Only || a.Id == ItemId.Ravenous_Hydra_Melee_Only);
}
private static void Shop_OnBuyItem(AIHeroClient sender, ShopActionEventArgs args)
{
if (!sender.IsMe) return;
if (args.Id == (int) ItemId.Tiamat_Melee_Only || args.Id == (int) ItemId.Ravenous_Hydra_Melee_Only)
{
Queuer.Tiamat =
ObjectManager.Player.InventoryItems.FirstOrDefault(
a => a.Id == ItemId.Tiamat_Melee_Only || a.Id == ItemId.Ravenous_Hydra_Melee_Only);
}
}
private static void Game_OnUpdate(EventArgs args)
{
SpellManager.UpdateSpells();
SpellEvents.UpdateSpells();
TickTask();
}
public static GameObject OrderTarget;
public static Vector3 OrderPosition;
public static GameObjectOrder Order;
private static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
{
if (!sender.IsMe) return;
Order = args.Order;
OrderPosition = args.TargetPosition;
OrderTarget = args.Target;
}
public static void IssueLastOrder()
{
switch (Order)
{
case GameObjectOrder.AttackUnit:
if (OrderTarget != null) Player.IssueOrder(Order, OrderTarget);
break;
case GameObjectOrder.MoveTo:
Player.IssueOrder(Order, OrderPosition);
break;
}
}
private static void Drawing_OnDraw(EventArgs args)
{
var pos = Drawing.WorldToScreen(Player.Instance.Position);
if (DrawMenu["draw.rState"].Cast<CheckBox>().CurrentValue)
Text.Draw("Forced R: " + IsRActive, Color.AliceBlue, (int) pos.X - 45,
(int) pos.Y + 40);
if (DrawMenu["draw.Combo"].Cast<CheckBox>().CurrentValue)
{
var s = Queuer.Queue.Aggregate("", (current, variable) => current + (" " + variable));
Drawing.DrawText(100, 100, Color.Wheat, s);
}
if (DrawMenu["draw.Q"].Cast<CheckBox>().CurrentValue)
{
Circle.Draw(SpellManager.Spells[SpellSlot.Q].IsReady() ? SharpDX.Color.Cyan : SharpDX.Color.OrangeRed,
SpellManager.Spells[SpellSlot.Q].Range, Player.Instance.Position);
}
if (DrawMenu["draw.W"].Cast<CheckBox>().CurrentValue)
{
Circle.Draw(SpellManager.Spells[SpellSlot.W].IsReady() ? SharpDX.Color.Cyan : SharpDX.Color.OrangeRed,
SpellManager.Spells[SpellSlot.W].Range, Player.Instance.Position);
}
if (DrawMenu["draw.E"].Cast<CheckBox>().CurrentValue)
{
Circle.Draw(SpellManager.Spells[SpellSlot.E].IsReady() ? SharpDX.Color.Cyan : SharpDX.Color.OrangeRed,
SpellManager.Spells[SpellSlot.E].Range, Player.Instance.Position);
}
if (DrawMenu["draw.R"].Cast<CheckBox>().CurrentValue)
{
Circle.Draw(SpellManager.Spells[SpellSlot.R].IsReady() ? SharpDX.Color.Cyan : SharpDX.Color.OrangeRed,
SpellManager.Spells[SpellSlot.R].Range, Player.Instance.Position);
}
}
private static void TickTask()
{
Orbwalker.ForcedTarget = null;
if (BurstActive)
{
States.Burst();
return;
}
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
{
States.Combo();
return;
}
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
{
States.Harass();
return;
}
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
{
var target = EntityManager.MinionsAndMonsters.GetJungleMonsters(Player.Instance.Position,
SpellManager.Spells[SpellSlot.Q].Range + 300).OrderByDescending(a => a.MaxHealth).FirstOrDefault();
if (target != null)
{
States.Jungle();
return;
}
}
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
{
var target = EntityManager.MinionsAndMonsters.GetJungleMonsters(Player.Instance.Position,
SpellManager.Spells[SpellSlot.Q].Range + 300).OrderByDescending(a => a.MaxHealth).FirstOrDefault();
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear) && target == null)
{
States.WaveClear();
return;
}
}
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit))
{
States.LastHit();
return;
}
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee))
{
States.Flee();
return;
}
if (Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.None && !BurstActive && Queuer.Queue.Any())
{
Queuer.Queue.Clear();
}
}
}
}