本文整理汇总了C#中EloBuddy类的典型用法代码示例。如果您正苦于以下问题:C# EloBuddy类的具体用法?C# EloBuddy怎么用?C# EloBuddy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EloBuddy类属于命名空间,在下文中一共展示了EloBuddy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Dash_OnDash
private static void Dash_OnDash(Obj_AI_Base sender, EloBuddy.SDK.Events.Dash.DashEventArgs e)
{
var hero = sender as AIHeroClient;
if (hero != null && hero.IsValid)
{
if (!DetectedDashes.ContainsKey(hero.NetworkId))
{
DetectedDashes.Add(hero.NetworkId, new DashArgs());
}
var path = new List<Vector2> { hero.ServerPosition.ToVector2() };
if(e.Path != null) {
path.AddRange(e.Path.ToList());
}
DetectedDashes[hero.NetworkId] = new DashArgs
{
StartTick = (int)((Game.Time * 1000) - (Game.Ping / 2)),
Speed = e.Speed,
StartPos = hero.ServerPosition.To2D(),
Unit = sender,
Path = path,
EndPos = DetectedDashes[hero.NetworkId].Path.Last(),
EndTick =
DetectedDashes[hero.NetworkId].StartTick
+ (int)
(1000
* (DetectedDashes[hero.NetworkId].EndPos.Distance(
DetectedDashes[hero.NetworkId].StartPos)
/ DetectedDashes[hero.NetworkId].Speed)),
Duration =
DetectedDashes[hero.NetworkId].EndTick
- DetectedDashes[hero.NetworkId].StartTick
};
}
}
示例2: Teleport_OnTeleport
private static void Teleport_OnTeleport(Obj_AI_Base sender, EloBuddy.SDK.Events.Teleport.TeleportEventArgs args)
{
if (sender.NetworkId==p.NetworkId && args.Type == TeleportType.Recall)
{
recalling = args.Status == TeleportStatus.Start;
}
}
示例3: AddRTracker
public static void AddRTracker(EloBuddy.Champion hero, string rObjectName, int timeToWait)
{
if (EntityManager.Heroes.Enemies.Any(h => h.Hero == hero))
{
GameObject rObject = null;
var rObjectTime = 0;
var allyCastedR = false;
Game.OnTick += delegate
{
if (SpellSlot.E.IsReady())
{
if (rObject != null)
{
if (rObjectTime > 0 && Core.GameTickCount - rObjectTime >= timeToWait &&
Core.GameTickCount - rObjectTime <= 4000)
{
if (MenuManager.GetSubMenu("Automatic").CheckBox("E.Spells") || Combo.IsActive)
{
SpellManager.E.Cast(rObject.Position);
}
}
}
}
};
Obj_AI_Base.OnProcessSpellCast += delegate (Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
var senderHero = sender as AIHeroClient;
if (senderHero != null && senderHero.IsAlly && senderHero.Hero == hero)
{
if (args.Slot == SpellSlot.R)
{
allyCastedR = true;
Core.DelayAction(delegate { allyCastedR = false; }, 10000);
}
}
};
GameObject.OnCreate += delegate (GameObject sender, EventArgs args)
{
if (sender.Name.Equals(rObjectName) && !allyCastedR)
{
rObject = sender;
rObjectTime = Core.GameTickCount;
Core.DelayAction(delegate
{
rObject = null;
rObjectTime = 0;
}, 5200);
}
};
GameObject.OnDelete += delegate (GameObject sender, EventArgs args)
{
if (rObject != null && rObject.IdEquals(sender))
{
//rObject = null;
//rObjectTime = 0;
}
};
}
}
示例4: Gapcloser_OnGapCloser
private static void Gapcloser_OnGapCloser(AIHeroClient sender, EloBuddy.SDK.Events.Gapcloser.GapcloserEventArgs e)
{
if (sender == null || sender.IsAlly) return;
if ((e.End.Distance(Variables._Player) <= 70) && Manager.MenuManager.GapcloseE && Manager.SpellManager.E.IsReady())
{
Manager.SpellManager.E.Cast(sender);
}
if ((e.End.Distance(Variables._Player) <= 70) && Manager.MenuManager.GapcloseQ && Manager.SpellManager.Q.IsReady())
{
var QPos = e.End.Extend(Variables._Player.Position, Manager.SpellManager.Q.Range);
Player.CastSpell(SpellSlot.Q, QPos.To3D());
}
}
示例5: FleeMode
private void FleeMode(EkkoCore core, EloBuddy.AIHeroClient target, bool useQ, bool useE, bool useW)
{
this.CastEOut(target, core);
if (useQ && core.spells.Q.IsInRange(target))
{
var predQ = core.spells.Q.GetPrediction(target);
if (predQ.HitChance >= HitChance.High)
{
core.spells.Q.Cast(predQ.CastPosition);
}
}
if (useW && core.spells.W.IsInRange(Prediction.Position.PredictUnitPosition(target, core.spells.W.CastDelay * 1000 + Game.Ping).To3D()))
{
var pos = Prediction.Position.PredictUnitPosition(target, core.spells.W.CastDelay * 1000 + Game.Ping);
core.spells.Q.Cast(pos.To3D());
}
}
示例6: OnGapCloser
internal void OnGapCloser(EloBuddy.AIHeroClient sender, EloBuddy.SDK.Events.Gapcloser.GapcloserEventArgs args ,EkkoCore core)
{
if (sender == null || sender.IsAlly ) return;
var Gapcloser = core._menu.MiscMenu["MG"].Cast<CheckBox>().CurrentValue;
if (Gapcloser != false)
{
if (sender.IsAttackingPlayer)
{
core.spells.W.Cast(core.Player.Position);
this.CastEOut(sender, core);
var predQ = core.spells.Q.GetPrediction(sender);
if (predQ.HitChance >= HitChance.High)
{
core.spells.Q.Cast(predQ.CastPosition);
}
}
}
}
示例7: Obj_AI_Hero_OnProcessSpellCast
private static void Obj_AI_Hero_OnProcessSpellCast(EloBuddy.Obj_AI_Base sender, EloBuddy.GameObjectProcessSpellCastEventArgs args)
{
if (sender.IsEnemy)
{
if (Player != null && spells[Spells.R].IsReady())
{
if ((!(sender is EloBuddy.AIHeroClient) || args.SData.IsAutoAttack()) && args.Target != null
&& args.Target.NetworkId == Player.NetworkId)
{
incomingDamage.Add(
Player.ServerPosition.LSDistance(sender.ServerPosition) / args.SData.MissileSpeed + EloBuddy.Game.Time,
(float)sender.LSGetAutoAttackDamage(Player));
}
else if (sender is EloBuddy.AIHeroClient)
{
var attacker = (EloBuddy.AIHeroClient)sender;
var slot = attacker.GetSpellSlot(args.SData.Name);
if (slot != EloBuddy.SpellSlot.Unknown)
{
if (slot == attacker.GetSpellSlot("SummonerDot") && args.Target != null
&& args.Target.NetworkId == Player.NetworkId)
{
instantDamage.Add(
EloBuddy.Game.Time + 2,
(float)attacker.GetSummonerSpellDamage(Player, LeagueSharp.Common.Damage.SummonerSpell.Ignite));
}
else if (slot.HasFlag(EloBuddy.SpellSlot.Q | EloBuddy.SpellSlot.W | EloBuddy.SpellSlot.E | EloBuddy.SpellSlot.R)
&& ((args.Target != null && args.Target.NetworkId == Player.NetworkId)
|| args.End.LSDistance(Player.ServerPosition) < Math.Pow(args.SData.LineWidth, 2)))
{
instantDamage.Add(EloBuddy.Game.Time + 2, (float)attacker.LSGetSpellDamage(Player, slot));
}
}
}
}
}
if (sender.IsMe)
{
if (args.SData.Name.Equals("EkkoE", StringComparison.InvariantCultureIgnoreCase))
{
LeagueSharp.Common.Utility.DelayAction.Add(250, EloBuddy.SDK.Orbwalker.ResetAutoAttack);
}
}
}
示例8: IgniteDamage
private static float IgniteDamage(EloBuddy.AIHeroClient target)
{
if (ignite == EloBuddy.SpellSlot.Unknown || Player.Spellbook.CanUseSpell(ignite) != EloBuddy.SpellState.Ready)
{
return 0f;
}
return (float)Player.GetSummonerSpellDamage(target, LeagueSharp.Common.Damage.SummonerSpell.Ignite);
}
示例9: getSliderItem
public static int getSliderItem(EloBuddy.SDK.Menu.Menu m, string item)
{
return m[item].Cast<Slider>().CurrentValue;
}
示例10: getCheckBoxItem
public static bool getCheckBoxItem(EloBuddy.SDK.Menu.Menu m, string item)
{
return m[item].Cast<CheckBox>().CurrentValue;
}
示例11: handeQ
private void handeQ(AIHeroClient target, EloBuddy.SDK.Enumerations.HitChance hitChance)
{
if (player.LSDistance(target) <= Orbwalking.GetRealAutoAttackRange(target) && !Orbwalker.CanAutoAttack &&
target.GetBuffCount("TahmKenchPDebuffCounter") != 2)
{
Q.CastIfHitchanceEquals(target, hitChance, getCheckBoxItem(config, "packets"));
}
else if (player.LSDistance(target) > Orbwalking.GetRealAutoAttackRange(target))
{
Q.CastIfHitchanceEquals(target, hitChance, getCheckBoxItem(config, "packets"));
}
}
示例12: IsKillable
private bool IsKillable(EloBuddy.AIHeroClient hero)
{
return EloBuddy.ObjectManager.Player.GetAutoAttackDamage(hero) * 2 < hero.Health;
}
示例13: IsInvulnerable
private bool IsInvulnerable(EloBuddy.AIHeroClient target)
{
return target.HasBuffOfType(EloBuddy.BuffType.SpellShield) || target.HasBuffOfType(EloBuddy.BuffType.SpellImmunity);
}
示例14: IsCondemnable
private bool IsCondemnable(EloBuddy.AIHeroClient hero)
{
if (!hero.LSIsValidTarget(550f) || hero.HasBuffOfType(EloBuddy.BuffType.SpellShield) ||
hero.HasBuffOfType(EloBuddy.BuffType.SpellImmunity) || hero.IsDashing()) return false;
//values for pred calc pP = player position; p = enemy position; pD = push distance
var pP = EloBuddy.ObjectManager.Player.ServerPosition;
var p = hero.ServerPosition;
var pD = EPushDistanceSlider;
var mode = EModeStringList;
if (mode == 1 && (IsCollisionable(p.LSExtend(pP, -pD)) || IsCollisionable(p.LSExtend(pP, -pD / 2f)) ||
IsCollisionable(p.LSExtend(pP, -pD / 3f))))
{
if (!hero.CanMove)
return true;
var enemiesCount = EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(1200);
if (enemiesCount > 1 && enemiesCount <= 3)
{
var prediction = E.GetPrediction(hero);
for (var i = 15; i < pD; i += 75)
{
if (i > pD)
{
var lastPosFlags = EloBuddy.NavMesh.GetCollisionFlags(
prediction.UnitPosition.ToVector2()
.Extend(
pP.ToVector2(),
-pD)
.ToVector3());
if (lastPosFlags.HasFlag(EloBuddy.CollisionFlags.Wall) || lastPosFlags.HasFlag(EloBuddy.CollisionFlags.Building))
{
return true;
}
return false;
}
var posFlags = EloBuddy.NavMesh.GetCollisionFlags(
prediction.UnitPosition.ToVector2()
.Extend(
pP.ToVector2(),
-i)
.ToVector3());
if (posFlags.HasFlag(EloBuddy.CollisionFlags.Wall) || posFlags.HasFlag(EloBuddy.CollisionFlags.Building))
{
return true;
}
}
return false;
}
else
{
var hitchance = EHitchanceSlider;
var angle = 0.20 * hitchance;
const float travelDistance = 0.5f;
var alpha = new Vector2((float)(p.X + travelDistance * Math.Cos(Math.PI / 180 * angle)),
(float)(p.X + travelDistance * Math.Sin(Math.PI / 180 * angle)));
var beta = new Vector2((float)(p.X - travelDistance * Math.Cos(Math.PI / 180 * angle)),
(float)(p.X - travelDistance * Math.Sin(Math.PI / 180 * angle)));
for (var i = 15; i < pD; i += 100)
{
if (i > pD) return false;
if (IsCollisionable(pP.ToVector2().Extend(alpha,
i)
.ToVector3()) && IsCollisionable(pP.ToVector2().Extend(beta, i).ToVector3())) return true;
}
return false;
}
}
if (mode == 2 &&
(IsCollisionable(p.LSExtend(pP, -pD)) || IsCollisionable(p.LSExtend(pP, -pD / 2f)) ||
IsCollisionable(p.LSExtend(pP, -pD / 3f))))
{
if (!hero.CanMove ||
(hero.Spellbook.IsAutoAttacking))
return true;
var hitchance = EHitchanceSlider;
var angle = 0.20 * hitchance;
const float travelDistance = 0.5f;
var alpha = new Vector2((float)(p.X + travelDistance * Math.Cos(Math.PI / 180 * angle)),
(float)(p.X + travelDistance * Math.Sin(Math.PI / 180 * angle)));
var beta = new Vector2((float)(p.X - travelDistance * Math.Cos(Math.PI / 180 * angle)),
(float)(p.X - travelDistance * Math.Sin(Math.PI / 180 * angle)));
for (var i = 15; i < pD; i += 100)
{
if (i > pD)
{
return IsCollisionable(alpha.Extend(pP.ToVector2(),
-pD)
.ToVector3()) && IsCollisionable(beta.Extend(pP.ToVector2(), -pD).ToVector3());
}
if (IsCollisionable(alpha.Extend(pP.ToVector2(),
-i)
.ToVector3()) && IsCollisionable(beta.Extend(pP.ToVector2(), -i).ToVector3())) return true;
}
return false;
//.........这里部分代码省略.........
示例15: Gapcloser_OnGapcloser
private void Gapcloser_OnGapcloser(AIHeroClient sender, EloBuddy.SDK.Events.Gapcloser.GapcloserEventArgs e)
{
if (getCheckBoxItem(gapCloser, "antiGap") && e.Sender.IsHPBarRendered && e.Sender.IsVisible)
{
if (e.Sender.LSIsValidTarget(_q.Range))
if (_q.IsReady())
_q.CastOnUnit(e.Sender);
if (_w.IsReady())
_w.Cast();
if (e.End.LSDistance(ObjectManager.Player.Position) <= 300)
if (_r.IsReady())
_r.Cast(ObjectManager.Player.Position);
}
}