Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 39 additions & 31 deletions hi im gosu/hi im gosu/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#region
#region

using System;
using System.Collections.Generic;
Expand All @@ -25,7 +25,7 @@ class Vayne
public static Obj_AI_Hero tar;
public const string ChampName = "Vayne";
public static Obj_AI_Hero Player;


static void Main(string[] args)
{
Expand All @@ -44,22 +44,16 @@ static void Main(string[] args)
public static void Game_OnGameLoad(EventArgs args)
{
Player = ObjectManager.Player;
//Utils.PrintMessage("Vayne loaded");
if (Player.ChampionName != ChampName) return;
spellData = new Dictionary<string, SpellSlot>();
//Game.PrintChat("Riven");
menu = new Menu("Gosu", "Gosu", true);
//Orbwalker
menu.AddSubMenu(new Menu("Orbwalker", "Orbwalker"));
orbwalker = new Orbwalking.Orbwalker(menu.SubMenu("Orbwalker"));
//TS
var TargetSelectorMenu = new Menu("Target Selector", "Target Selector");
TargetSelector.AddToMenu(TargetSelectorMenu);
// SimpleTs.AddToMenu(TargetSelectorMenu);
menu.AddSubMenu(TargetSelectorMenu);

//menu.AddSubMenu(new Menu("Combo", "combo"));
//menu.SubMenu("combo").AddItem(new MenuItem("laugh", "Cancel w/ Laugh")).SetValue(false);
menu.AddItem(
new MenuItem("UseET", "Use E (Toggle)").SetValue(
new KeyBind("T".ToCharArray()[0], KeyBindType.Toggle)));
Expand Down Expand Up @@ -173,39 +167,53 @@ public static void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit ta
Q.Cast(Game.CursorPos);
}
}
//Q.Cast(Game.CursorPos);

if (Q.IsReady() && E.IsReady())
{
for (int i = -3; i < 4; i++)
{
for (int j = 0; j < 10; j++)
{
if (Player.Position.To2D().RotateAroundPoint(tar.Position.To2D(), Geometry.DegreeToRadian(15*i)).Extend(tar.Position.To2D(), Player.Position.To2D().Distance(tar.Position.To2D()) + 45*j).IsWall())
{
E.CastOnUnit(tar);
Q.Cast(Player.Position.To2D().RotateAroundPoint(tar.Position.To2D(), Geometry.DegreeToRadian(15 * i)));
}
}
}
}
}
}

public static Vector3 Normalize(Vector3 A)
{
double distance = Math.Sqrt(A.X*A.X + A.Y*A.Y);
return new Vector3(new Vector2((float) (A.X/distance)), (float) (A.Y/distance));
double distance = Math.Sqrt(A.X * A.X + A.Y * A.Y);
return new Vector3(new Vector2((float)(A.X / distance)), (float)(A.Y / distance));
}

public static void Game_OnGameUpdate(EventArgs args)
{
if (!E.IsReady()) return; //||
//(orbwalker.ActiveMode.ToString() != "Combo" || !menu.Item("UseEC").GetValue<bool>()) &&
//!menu.Item("UseET").GetValue<KeyBind>().Active)) return;
//(orbwalker.ActiveMode.ToString() != "Combo" || !menu.Item("UseEC").GetValue<bool>()) &&
//!menu.Item("UseET").GetValue<KeyBind>().Active)) return;
if (((orbwalker.ActiveMode.ToString() == "Combo" && menu.Item("UseEC").GetValue<bool>()) || (orbwalker.ActiveMode.ToString() == "Mixed" && menu.Item("he").GetValue<bool>()) || menu.Item("UseET").GetValue<KeyBind>().Active))
foreach (var hero in from hero in ObjectManager.Get<Obj_AI_Hero>().Where(hero => hero.IsValidTarget(550f))
let prediction = E.GetPrediction(hero)
where NavMesh.GetCollisionFlags(
prediction.UnitPosition.To2D()
.Extend(ObjectManager.Player.ServerPosition.To2D(),
-menu.Item("PushDistance").GetValue<Slider>().Value)
.To3D())
.HasFlag(CollisionFlags.Wall) || NavMesh.GetCollisionFlags(
prediction.UnitPosition.To2D()
.Extend(ObjectManager.Player.ServerPosition.To2D(),
-(menu.Item("PushDistance").GetValue<Slider>().Value/2))
.To3D())
.HasFlag(CollisionFlags.Wall)
select hero)
{
E.Cast(hero);
}
foreach (var hero in from hero in ObjectManager.Get<Obj_AI_Hero>().Where(hero => hero.IsValidTarget(550f))
let prediction = E.GetPrediction(hero)
where NavMesh.GetCollisionFlags(
prediction.UnitPosition.To2D()
.Extend(ObjectManager.Player.ServerPosition.To2D(),
-menu.Item("PushDistance").GetValue<Slider>().Value)
.To3D())
.HasFlag(CollisionFlags.Wall) || NavMesh.GetCollisionFlags(
prediction.UnitPosition.To2D()
.Extend(ObjectManager.Player.ServerPosition.To2D(),
-(menu.Item("PushDistance").GetValue<Slider>().Value / 2))
.To3D())
.HasFlag(CollisionFlags.Wall)
select hero)
{
E.Cast(hero);
}
}
}
}
}