本文整理汇总了C#中Ability.GetCastRange方法的典型用法代码示例。如果您正苦于以下问题:C# Ability.GetCastRange方法的具体用法?C# Ability.GetCastRange怎么用?C# Ability.GetCastRange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ability
的用法示例。
在下文中一共展示了Ability.GetCastRange方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Cast
public static bool Cast(Ability ability, Unit target, string name)
{
if (name == "razor_static_link" && target.Distance2D(AbilityMain.Me) > (ability.GetCastRange(name) * 0.75))
{
return false;
}
if (ability.IsAbilityBehavior(AbilityBehavior.UnitTarget, name))
{
Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
ManageAutoAttack.AutoAttackDisabled = true;
SoulRing.Cast(ability);
ability.UseAbility(target);
return true;
}
if ((ability.IsAbilityBehavior(AbilityBehavior.AreaOfEffect, name)
|| ability.IsAbilityBehavior(AbilityBehavior.Point, name))
&& (Prediction.StraightTime(target) > 1000 || target.MovementSpeed < 200))
{
Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
ManageAutoAttack.AutoAttackDisabled = true;
return ability.CastSkillShot(target, name, SoulRing.Check(ability) ? MyAbilities.SoulRing : null);
}
if (ability.IsAbilityBehavior(AbilityBehavior.NoTarget, name))
{
Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
ManageAutoAttack.AutoAttackDisabled = true;
SoulRing.Cast(ability);
ability.UseAbility();
return true;
}
return false;
}
示例2: LinearProjectile
protected LinearProjectile(Ability ability)
: base(ability)
{
speed = ability.GetProjectileSpeed();
var widthString = AbilityDatabase.Find(Name).Width;
var endWidthString = AbilityDatabase.Find(Name).EndWidth;
if (string.IsNullOrEmpty(widthString))
{
var radius = ability.GetRadius();
if ((int)ability.GetCastRange() != (int)radius)
{
startRadius = endRadius = radius + 60;
}
else
{
startRadius = endRadius = 250;
}
}
else
{
startRadius = ability.AbilitySpecialData.First(x => x.Name == widthString).Value + 60;
endRadius = ability.AbilitySpecialData.FirstOrDefault(x => x.Name == endWidthString)?.Value + 60
?? startRadius;
}
if (startRadius > endRadius)
{
endRadius = startRadius;
}
Debugger.WriteLine("// Speed: " + speed);
Debugger.WriteLine("// StartRadius: " + startRadius);
Debugger.WriteLine("// EndRadius: " + endRadius);
}
示例3: Combo
public void Combo()
{
if (!Menu.Item("enabled").IsActive())
return;
//spell
Q = me.Spellbook.SpellQ;
W = me.Spellbook.SpellW;
E = me.Spellbook.SpellE;
R = me.Spellbook.SpellR;
Active = Game.IsKeyDown(Menu.Item("keyBind").GetValue<KeyBind>().Key);
var s = ObjectManager.GetEntities<Hero>()
.Where(x => x.IsVisible && x.IsAlive && x.Team != me.Team && !x.IsIllusion && x.Distance2D(me) <= 1500).ToList();
if (Active)
{
e = Toolset.ClosestToMouse(me);
if (e == null) return;
if (e.IsAlive && !e.IsInvul())
{
if (me.IsAlive && me.Distance2D(e) <= 1900)
{
// item
satanic = me.FindItem("item_satanic");
shiva = me.FindItem("item_shivas_guard");
dagon = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));
arcane = me.FindItem("item_arcane_boots");
mom = me.FindItem("item_mask_of_madness");
medall = me.FindItem("item_medallion_of_courage") ?? me.FindItem("item_solar_crest");
ethereal = me.FindItem("item_ethereal_blade");
blink = me.FindItem("item_blink");
soulring = me.FindItem("item_soul_ring");
cheese = me.FindItem("item_cheese");
halberd = me.FindItem("item_heavens_halberd");
abyssal = me.FindItem("item_abyssal_blade");
mjollnir = me.FindItem("item_mjollnir");
manta = me.FindItem("item_manta");
mail = me.FindItem("item_blade_mail");
orchid = me.FindItem("item_orchid") ?? me.FindItem("item_bloodthorn");
bkb = me.FindItem("item_black_king_bar");
phase = me.FindItem("item_phase_boots");
sheep = e.ClassID == ClassID.CDOTA_Unit_Hero_Tidehunter ? null : me.FindItem("item_sheepstick");
var linkens = e.IsLinkensProtected();
if (
(R.CanBeCasted()
|| me.Health >= (me.MaximumHealth * 0.4))
&& blink.CanBeCasted()
&& me.Position.Distance2D(e) > 300
&& me.Position.Distance2D(e) < 1180
&& Utils.SleepCheck("blink"))
{
blink.UseAbility(e.Position);
Utils.Sleep(250, "blink");
}
if (
Q.CanBeCasted()
&& ((dagon != null && !dagon.CanBeCasted())
|| (R.CanBeCasted()
&& me.Health >= (me.MaximumHealth * 0.3))
|| (!R.CanBeCasted() && me.Health <= (me.MaximumHealth * 0.3)))
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name)
&& me.Position.Distance2D(e) < Q.GetCastRange() &&
Utils.SleepCheck("Q"))
{
Q.UseAbility();
Utils.Sleep(150, "Q");
}
if (E.CanBeCasted()
&& !Q.CanBeCasted()
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(E.Name)
&& me.Position.Distance2D(e) < me.GetAttackRange()
&& Utils.SleepCheck("E"))
{
E.UseAbility();
Utils.Sleep(150, "E");
}
if (W.CanBeCasted()
&& !Q.CanBeCasted()
&& (E == null || !E.CanBeCasted() || !Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(E.Name))
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(W.Name)
&& me.Position.Distance2D(e) < me.GetAttackRange()
&& Utils.SleepCheck("W"))
{
W.UseAbility();
Utils.Sleep(150, "W");
}
if ( // sheep
sheep != null
&& sheep.CanBeCasted()
&& me.CanCast()
&& !e.IsLinkensProtected()
&& !e.IsMagicImmune()
&& me.Distance2D(e) <= 1400
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(sheep.Name)
&& Utils.SleepCheck("sheep")
)
{
sheep.UseAbility(e);
Utils.Sleep(250, "sheep");
} // sheep Item end
var stoneModif = e.HasModifier("modifier_medusa_stone_gaze_stone");
//.........这里部分代码省略.........
示例4: Combo
//.........这里部分代码省略.........
&& ethereal.CanBeCasted()
&& me.CanCast()
&& !e.IsLinkensProtected()
&& !e.IsMagicImmune()
&& !stoneModif
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(ethereal.Name)
&& Utils.SleepCheck("ethereal")
)
{
ethereal.UseAbility(e);
Utils.Sleep(200, "ethereal");
} // ethereal Item end
if (!ethereal.CanBeCasted() || ethereal == null ||
!Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(ethereal.Name))
{
if (
W != null
&& W.CanBeCasted()
&& me.CanCast()
&& !me.HasModifier("modifier_earthshaker_enchant_totem")
&& me.Distance2D(e) < 2300
&& me.Distance2D(e) >= 1200
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(W.Name)
&& Utils.SleepCheck("W"))
{
W.UseAbility();
Utils.Sleep(200, "W");
}
if (
W != null
&& W.CanBeCasted()
&& me.CanCast()
&& !me.HasModifier("modifier_earthshaker_enchant_totem")
&& me.Distance2D(e) < W.GetCastRange()
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(W.Name)
&& Utils.SleepCheck("W"))
{
W.UseAbility();
Utils.Sleep(200, "W");
}
if (me.AghanimState())
{
if (
W != null
&& W.CanBeCasted()
&& me.CanCast()
&& !me.HasModifier("modifier_earthshaker_enchant_totem")
&& me.Distance2D(e) >= 300
&& me.Distance2D(e) < 900 + me.HullRadius
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(W.Name)
&& Utils.SleepCheck("W"))
{
W.UseAbility(e.Position);
Utils.Sleep(200, "W");
}
if (
W != null
&& W.CanBeCasted()
&& me.CanCast()
&& !me.HasModifier("modifier_earthshaker_enchant_totem")
&& me.Distance2D(e) <= 300
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(W.Name)
&& Utils.SleepCheck("W"))
{
W.UseAbility(me);
Utils.Sleep(200, "W");
示例5: Combo
public void Combo()
{
Active = Game.IsKeyDown(Menu.Item("keyBind").GetValue<KeyBind>().Key);
Q = me.Spellbook.SpellQ;
R = me.Spellbook.SpellR;
E = me.Spellbook.SpellE;
mom = me.FindItem("item_mask_of_madness");
urn = me.FindItem("item_urn_of_shadows");
dagon = me.Inventory.Items.FirstOrDefault(x => x.Name.Contains("item_dagon"));
ethereal = me.FindItem("item_ethereal_blade");
halberd = me.FindItem("item_heavens_halberd");
mjollnir = me.FindItem("item_mjollnir");
blink = me.FindItem("item_blink");
orchid = me.FindItem("item_orchid") ?? me.FindItem("item_bloodthorn");
abyssal = me.FindItem("item_abyssal_blade");
mail = me.FindItem("item_blade_mail");
bkb = me.FindItem("item_black_king_bar");
satanic = me.FindItem("item_satanic");
medall = me.FindItem("item_medallion_of_courage") ?? me.FindItem("item_solar_crest");
Shiva = me.FindItem("item_shivas_guard");
vail = me.FindItem("item_veil_of_discord");
var v =
ObjectManager.GetEntities<Hero>()
.Where(x => x.Team != me.Team && x.IsAlive && x.IsVisible && !x.IsIllusion && !x.IsMagicImmune())
.ToList();
e = Toolset.ClosestToMouse(me);
if (e == null)
return;
if (Active)
{
if (Menu.Item("orbwalk").GetValue<bool>() && me.Distance2D(e) <= 1900)
{
Orbwalking.Orbwalk(e, 0, 1600, true, true);
}
}
if (Active && me.Distance2D(e) <= 1400 && e != null && e.IsAlive && !Toolset.invUnit(me))
{
if (
blink != null
&& Q.CanBeCasted()
&& me.CanCast()
&& blink.CanBeCasted()
&& me.Distance2D(e) < 1180
&& me.Distance2D(e) > 700
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(blink.Name)
&& Utils.SleepCheck("blink")
)
{
blink.UseAbility(e.Position);
Utils.Sleep(250, "blink");
}
if ( // vail
vail != null
&& vail.CanBeCasted()
&& me.CanCast()
&& !e.IsMagicImmune()
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(vail.Name)
&& me.Distance2D(e) <= 1500
&& Utils.SleepCheck("vail")
)
{
vail.UseAbility(e.Position);
Utils.Sleep(250, "vail");
} // orchid Item end
if (
Q != null && Q.CanBeCasted() && me.Distance2D(e) <= Q.GetCastRange()
&& me.CanAttack()
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name)
&& Utils.SleepCheck("Q")
)
{
Q.UseAbility(e.Predict(250));
Utils.Sleep(150, "Q");
}
if (
E != null && E.CanBeCasted() && me.Distance2D(e) <= 800
&& !Q.CanBeCasted()
&& !R.CanBeCasted()
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(E.Name)
&& me.NetworkActivity != NetworkActivity.Attack
&& Utils.SleepCheck("E")
)
{
E.UseAbility(e.Position);
Utils.Sleep(150, "E");
}
var enemy = ObjectManager.GetEntities<Hero>().Where(x => x.IsAlive && x.Team != me.Team).ToList();
for (int i = 0; i < enemy.Count(); i++)
{
if (
R != null && R.CanBeCasted() && me.Distance2D(enemy[i]) <= 800
&& !Q.CanBeCasted()
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(R.Name)
&& Utils.SleepCheck("R")
)
{
//.........这里部分代码省略.........
示例6: Combo
public void Combo()
{
Active = Game.IsKeyDown(Menu.Item("keyBind").GetValue<KeyBind>().Key);
if (!Menu.Item("enabled").IsActive())
return;
Q = me.Spellbook.SpellQ;
W = me.Spellbook.SpellW;
R = me.Spellbook.SpellR;
var v =
ObjectManager.GetEntities<Hero>()
.Where(x => x.Team != me.Team && x.IsAlive && x.IsVisible && !x.IsIllusion)
.ToList();
mom = me.FindItem("item_mask_of_madness");
urn = me.FindItem("item_urn_of_shadows");
dagon = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));
mjollnir = me.FindItem("item_mjollnir");
abyssal = me.FindItem("item_abyssal_blade");
lotusorb = me.FindItem("item_lotus_orb");
mail = me.FindItem("item_blade_mail");
armlet = me.FindItem("item_armlet");
bkb = me.FindItem("item_black_king_bar");
satanic = me.FindItem("item_satanic");
blink = me.FindItem("item_blink");
medall = me.FindItem("item_medallion_of_courage") ?? me.FindItem("item_solar_crest");
Shiva = me.FindItem("item_shivas_guard");
e = Toolset.ClosestToMouse(me);
if (e == null) return;
var stoneModif = e.HasModifier("modifier_medusa_stone_gaze_stone");
if(stoneModif)return;
if (Active && me.Distance2D(e) <= 2000 && e.IsAlive && !me.IsInvisible())
{
if (
blink != null
&& me.CanCast()
&& blink.CanBeCasted()
&& me.Distance2D(e) < 1180
&& me.Distance2D(e) > 400
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(blink.Name)
&& Utils.SleepCheck("blink")
)
{
blink.UseAbility(e.Position);
Utils.Sleep(250, "blink");
}
if (
Q != null && Q.CanBeCasted()
&& me.Distance2D(e) <= Q.GetCastRange() + me.HullRadius
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name)
&& Utils.SleepCheck("Q")
)
{
Q.UseAbility();
Utils.Sleep(200, "Q");
}
if ( // MOM
mom != null
&& mom.CanBeCasted()
&& me.CanCast()
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(mjollnir.Name)
&& Utils.SleepCheck("mom")
&& me.Distance2D(e) <= 700
)
{
mom.UseAbility();
Utils.Sleep(250, "mom");
}
if (
W != null && W.CanBeCasted() && me.Distance2D(e) <= W.GetCastRange()+me.HullRadius
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(W.Name)
&& !e.HasModifier("modifier_axe_battle_hunger")
&& Utils.SleepCheck("W")
)
{
W.UseAbility(e);
Utils.Sleep(200, "W");
}
if (lotusorb != null && lotusorb.CanBeCasted() &&
Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(lotusorb.Name)
&& (v.Count(x => x.Distance2D(me) <= 650) >= (Menu.Item("Heelm").GetValue<Slider>().Value) && Utils.SleepCheck("lotusorb"))
)
{
lotusorb.UseAbility(me);
Utils.Sleep(250, "lotusorb");
}
if ( // Mjollnir
mjollnir != null
&& mjollnir.CanBeCasted()
&& me.CanCast()
&& !e.IsMagicImmune()
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(mjollnir.Name)
&& Utils.SleepCheck("mjollnir")
&& me.Distance2D(e) <= 900
)
{
mjollnir.UseAbility(me);
Utils.Sleep(250, "mjollnir");
} // Mjollnir Item end
if ( // Medall
medall != null
//.........这里部分代码省略.........
示例7: Combo
public void Combo()
{
// Target initialization
// Spells initialization
Q = me.Spellbook.SpellQ;
W = me.Spellbook.SpellW;
E = me.Spellbook.SpellE;
R = me.Spellbook.SpellR;
// Items initialization
ethereal = me.FindItem("item_ethereal_blade");
vail = me.FindItem("item_veil_of_discord");
cheese = me.FindItem("item_cheese");
ghost = me.FindItem("item_ghost");
orchid = me.FindItem("item_orchid") ?? me.FindItem("item_bloodthorn");
atos = me.FindItem("item_rod_of_atos");
soul = me.FindItem("item_soul_ring");
arcane = me.FindItem("item_arcane_boots");
blink = me.FindItem("item_blink");
shiva = me.FindItem("item_shivas_guard");
dagon = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));
// State of keys initialization
Active = Game.IsKeyDown(Menu.Item("keyBind").GetValue<KeyBind>().Key) && !Game.IsChatOpen;
Push = Game.IsKeyDown(Menu.Item("keyQ").GetValue<KeyBind>().Key) && !Game.IsChatOpen;
enemies = ObjectManager.GetEntities<Hero>()
.Where(x => x.IsVisible && x.IsAlive && x.Team != me.Team && !x.IsFullMagicResist() && !x.IsIllusion).ToList();
// OnUpdateEvent::END
// [VickTheRock]
if (Push)
{
if (Q == null) return;
var unitsList = ObjectManager.GetEntities<Unit>().Where(creep =>
(creep.ClassID == ClassID.CDOTA_BaseNPC_Creep_Neutral
|| creep.ClassID == ClassID.CDOTA_BaseNPC_Invoker_Forged_Spirit
|| creep.ClassID == ClassID.CDOTA_BaseNPC_Warlock_Golem
|| creep.ClassID == ClassID.CDOTA_BaseNPC_Creep
|| creep.ClassID == ClassID.CDOTA_BaseNPC_Creep_Lane
|| creep.ClassID == ClassID.CDOTA_Unit_Hero_Beastmaster_Boar
|| creep.ClassID == ClassID.CDOTA_Unit_SpiritBear
|| creep.ClassID == ClassID.CDOTA_Unit_Broodmother_Spiderling
)
&& creep.IsAlive
&& creep.Distance2D(me) <= Q.GetCastRange() + me.HullRadius
&& creep.IsSpawned
&& creep.Team != me.Team
).ToList();
foreach (var v in unitsList)
{
var damageQ = qDmg[Q.Level];
if (me.Distance2D(v) < 1200)
damageQ += E.GetAbilityData("damage_health_pct") * 0.01 * v.Health;
var lens = me.HasModifier("modifier_item_aether_lens");
var spellamplymult = 1 + (me.TotalIntelligence / 16 / 100);
if (lens) damageQ *= 1.08;
damageQ *= spellamplymult;
damageQ *= (1 - v.MagicDamageResist);
if (Q.CanBeCasted() && v.Distance2D(me) <= Q.GetCastRange() + me.HullRadius && v.Health <= damageQ && Utils.SleepCheck("qq"))
{
Q.UseAbility(v);
Utils.Sleep(250, "qq");
}
}
} // if(Push)::END
e = Toolset.ClosestToMouse(me);
if (e == null) return;
var modifEther = e.HasModifier("modifier_item_ethereal_blade_slow");
var stoneModif = e.HasModifier("modifier_medusa_stone_gaze_stone");
sheep = e.Name == "npc_dota_hero_tidehunter" ? null : me.FindItem("item_sheepstick");
if (Active && me.IsAlive && e.IsAlive && Utils.SleepCheck("activated"))
{
var noBlade = e.HasModifier("modifier_item_blade_mail_reflect");
if (e.IsVisible && me.Distance2D(e) <= 2300 && !noBlade)
{
if ( // atos Blade
atos != null
&& atos.CanBeCasted()
&& me.CanCast()
&& !e.IsLinkensProtected()
&& !e.IsMagicImmune()
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(atos.Name)
&& me.Distance2D(e) <= 2000
&& Utils.SleepCheck("atos")
)
{
atos.UseAbility(e);
Utils.Sleep(250, "atos");
} // atos Item end
if (
blink != null
//.........这里部分代码省略.........
示例8: RangeVisible
public static void RangeVisible(Ability ability, bool visible, float crange = 0)
{
var name = NameManager.Name(ability);
ParticleEffect range;
if (!RangesDictionary.TryGetValue(ability, out range) || RangesDictionary[ability] == null
|| RangesDictionary[ability].IsDestroyed)
{
range = AbilityMain.Me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
if (!RangesDictionary.ContainsKey(ability))
{
RangesDictionary.Add(ability, range);
}
else
{
RangesDictionary[ability] = range;
}
}
var castrange = crange;
if (castrange == 0)
{
castrange = ability.GetCastRange();
}
if (!ability.IsAbilityBehavior(AbilityBehavior.NoTarget))
{
castrange += Math.Max(castrange / 9, 80);
}
else
{
castrange += Math.Max(castrange / 7, 40);
}
if (visible)
{
var menu = MainMenu.RangeDrawingMenu.SubMenu(name + "range");
range.SetControlPoint(
1,
new Vector3(
menu.Item(name + "red").GetValue<Slider>().Value,
menu.Item(name + "green").GetValue<Slider>().Value,
menu.Item(name + "blue").GetValue<Slider>().Value));
range.SetControlPoint(2, new Vector3(castrange, 255, 0));
range.SetControlPoint(3, new Vector3(10, 0, 0));
return;
}
RangesDictionary[ability].Dispose();
}
示例9: Combo
//.........这里部分代码省略.........
Utils.SleepCheck("ethereal")
)
{
ethereal.UseAbility(e);
Utils.Sleep(150, "ethereal");
}
if ((vail == null || !vail.CanBeCasted() || !Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(vail.Name)) && (ethereal == null || !ethereal.CanBeCasted() || !Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(ethereal.Name)))
{
if ( // sheep
sheep != null
&& sheep.CanBeCasted()
&& me.CanCast()
&& !e.IsLinkensProtected()
&& !e.IsMagicImmune()
&& !e.IsStunned()
&& !e.IsHexed()
&& me.Distance2D(e) <= 1400
&& !stoneModif
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(sheep.Name)
&& Utils.SleepCheck("sheep")
)
{
sheep.UseAbility(e);
Utils.Sleep(250, "sheep");
} // sheep Item end
if (
Q!=null
&& Q.CanBeCasted()
&& Q.Cooldown<=0
&& me.Mana>= Q.ManaCost
&& !e.IsStunned()
&& !e.IsHexed()
&& me.Distance2D(e) <= Q.GetCastRange() +me.HullRadius
&& !e.IsMagicImmune()
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name)
&& Utils.SleepCheck("Q"))
{
Q.CastSkillShot(e);
Utils.Sleep(100, "Q");
}
if (
W != null
&& W.CanBeCasted()
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(W.Name)
&& e.Mana >= (e.MaximumMana * 0.2)
&& me.Position.Distance2D(e.Position) < W.GetCastRange()
&& Utils.SleepCheck("W"))
{
W.UseAbility(e);
Utils.Sleep(100, "W");
}
if ( // SoulRing Item
soul != null &&
me.Health >= (me.MaximumHealth * 0.5) &&
me.Mana <= R.ManaCost &&
soul.CanBeCasted()
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(soul.Name)
&& Utils.SleepCheck("soul"))
{
soul.UseAbility();
Utils.Sleep(100, "soul");
} // SoulRing Item end
if ( // Arcane Boots Item
示例10: Combo
public void Combo()
{
if (!Menu.Item("enabled").IsActive())
return;
Active = Game.IsKeyDown(Menu.Item("keyBind").GetValue<KeyBind>().Key);
Q = me.Spellbook.SpellQ;
W = me.Spellbook.SpellW;
E = me.Spellbook.SpellE;
R = me.Spellbook.SpellR;
glimmer = me.FindItem("item_glimmer_cape");
manta = me.FindItem("item_manta");
pipe = me.FindItem("item_pipe");
guardian = me.FindItem("item_guardian_greaves") ?? me.FindItem("item_mekansm");
sphere = me.FindItem("item_sphere");
dagon = me.Inventory.Items.FirstOrDefault(x => x.Name.Contains("item_dagon"));
ethereal = me.FindItem("item_ethereal_blade");
halberd = me.FindItem("item_heavens_halberd");
mjollnir = me.FindItem("item_mjollnir");
orchid = me.FindItem("item_orchid") ?? me.FindItem("item_bloodthorn");
abyssal = me.FindItem("item_abyssal_blade");
mail = me.FindItem("item_blade_mail");
bkb = me.FindItem("item_black_king_bar");
satanic = me.FindItem("item_satanic");
medall = me.FindItem("item_medallion_of_courage") ?? me.FindItem("item_solar_crest");
Shiva = me.FindItem("item_shivas_guard");
var modifInv =
me.Modifiers.All(
x =>
x.Name == "modifier_item_silver_edge_windwalk" || x.Name == "modifier_item_edge_windwalk" ||
x.Name == "modifier_treant_natures_guise" || x.Name == "modifier_rune_invis");
var v =
ObjectManager.GetEntities<Hero>()
.Where(x => x.Team != me.Team && x.IsAlive && x.IsVisible && !x.IsIllusion)
.ToList();
e = Toolset.ClosestToMouse(me);
if (e == null) return;
if (Active && me.Distance2D(e) <= 1400 && e.IsAlive && !modifInv && Utils.SleepCheck("Combo"))
{
if ( //
E != null
&& E.CanBeCasted()
&& me.CanCast()
&& !e.HasModifier("oracle_fates_edict")
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(E.Name)
&& Utils.SleepCheck("E")
&& me.Distance2D(e) <= E.GetCastRange() + 400
)
{
E.UseAbility(e);
Utils.Sleep(250, "E");
}
if ( //
Q != null
&& Q.CanBeCasted()
&&
(E == null || !E.CanBeCasted() || !Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(E.Name))
&& me.CanCast()
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name)
&& !e.HasModifier("oracle_fates_edict")
&& me.Distance2D(e) <= Q.GetCastRange() + 400
&& Utils.SleepCheck("Q")
)
{
Q.UseAbility(e);
Utils.Sleep(250, "Q");
}
if ((!Menu.Item("Q spell").GetValue<bool>() || Q == null || !Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name)) && (!Q.IsInAbilityPhase && !Q.IsChanneling && !me.IsChanneling()))
{
if (Menu.Item("orbwalk").GetValue<bool>() && me.Distance2D(e) <= 1900 && Utils.SleepCheck("Orbwalk"))
{
Orbwalking.Orbwalk(e, 0, 1600, true, true);
Utils.Sleep(150, "Orbwalk");
}
if ( // Mjollnir
mjollnir != null
&& mjollnir.CanBeCasted()
&& me.CanCast()
&& !e.IsMagicImmune()
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(mjollnir.Name)
&& Utils.SleepCheck("mjollnir")
&& me.Distance2D(e) <= 900
)
{
mjollnir.UseAbility(me);
Utils.Sleep(250, "mjollnir");
} // Mjollnir Item end
if ( // Medall
medall != null
&& medall.CanBeCasted()
&& Utils.SleepCheck("Medall")
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(medall.Name)
&& me.Distance2D(e) <= 700
)
//.........这里部分代码省略.........
示例11: Combo
public void Combo()
{
if (!Menu.Item("enabled").IsActive() || Game.IsChatOpen || time.Enabled)
return;
me = ObjectManager.LocalHero;
Q = me.Spellbook.SpellQ;
W = me.Spellbook.SpellW;
R = me.Spellbook.SpellR;
leans = me.FindItem("item_aether_lens");
urn = me.FindItem("item_urn_of_shadows");
dagon = me.Inventory.Items.FirstOrDefault(x => x.Name.Contains("item_dagon"));
ethereal = me.FindItem("item_ethereal_blade");
Shiva = me.FindItem("item_shivas_guard");
glimmer = me.FindItem("item_glimmer_cape");
vail = me.FindItem("item_veil_of_discord");
orchid = me.FindItem("item_orchid") ?? me.FindItem("item_bloodthorn");
abyssal = me.FindItem("item_abyssal_blade");
atos = me.FindItem("item_rod_of_atos");
bkb = me.FindItem("item_black_king_bar");
mail = me.FindItem("item_blade_mail");
lotus = me.FindItem("item_lotus_orb");
Active = Game.IsKeyDown(Menu.Item("Combo Key").GetValue<KeyBind>().Key);
var v = ObjectManager.GetEntities<Hero>().Where(x => x.Team != me.Team && x.IsAlive && x.IsVisible && !x.IsIllusion && !x.IsMagicImmune()).ToList();
if (Active && Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(W.Name))
{
if (me.HasModifier("modifier_pudge_rot") && v.Count(x => x.Distance2D(me) <= W.GetCastRange()+me.HullRadius) == 0)
{
W.ToggleAbility();
time.Start();
}
else if(!me.HasModifier("modifier_pudge_rot") && v.Count(x => x.Distance2D(me) <= W.GetCastRange() + me.HullRadius) > 0)
{
W.ToggleAbility();
time.Start();
}
}
e = Toolset.ClosestToMouse(me);
if (e == null || !me.IsAlive) return;
sheep = e.ClassID == ClassID.CDOTA_Unit_Hero_Tidehunter ? null : me.FindItem("item_sheepstick");
if (R.IsInAbilityPhase || R.IsChanneling || me.IsChanneling()) return;
if (Active)
{
minRangeHook = e.HullRadius + 27;
CastRange = leans != null ? (Q.CastRange + 200 + e.HullRadius) : (Q.CastRange + e.HullRadius);
eMoveSpeed = e.HasModifier("modifier_spirit_breaker_charge_of_darkness") ? 550 + ((int)e.Spellbook.Spell1.Level * 50) : e.MovementSpeed;
Vector2 vector = new Vector2((float)Math.Cos(e.RotationRad) * eMoveSpeed, (float)Math.Sin(e.RotationRad) * eMoveSpeed);
Vector3 start = new Vector3((float)((0.3 + (Game.Ping / 1000)) * Math.Cos(e.RotationRad) * eMoveSpeed + e.Position.X),
(float)((0.3 + (Game.Ping / 1000)) * Math.Sin(e.RotationRad) * eMoveSpeed + e.NetworkPosition.Y), e.NetworkPosition.Z);
Vector3 specialPosition = new Vector3((float)(minRangeHook * Math.Cos(e.RotationRad) + e.NetworkPosition.X),
(float)(minRangeHook * Math.Sin(e.RotationRad) + e.NetworkPosition.Y),
e.NetworkPosition.Z);
HookPosition = Interception(start, vector, me.Position, 1600);
if (
atos != null && atos.CanBeCasted() && me.CanCast() && !e.IsMagicImmune() && !e.HasModifier("modifier_spirit_breaker_charge_of_darkness")
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(atos.Name) && me.Distance2D(e) <= 1500 && Utils.SleepCheck("a")
)
{
atos.UseAbility(e);
Utils.Sleep(250, "a");
}
else if (Q.CanBeCasted() && Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name))
{
if (e.NetworkActivity == NetworkActivity.Move || e.HasModifier("modifier_spirit_breaker_charge_of_darkness"))
{
for (double i = 0.03; i <= 0.135; i += 0.03)
{
Vector3 estimated = new Vector3((float)(i * Math.Cos(e.RotationRad) * eMoveSpeed + HookPosition.X),
(float)(i * Math.Sin(e.RotationRad) * eMoveSpeed + HookPosition.Y), e.NetworkPosition.Z);
if (GetTimeToTurn(estimated) <= i)
{
HookPosition = estimated;
TimeTurn = i;
break;
}
}
CastPos = (HookPosition - me.Position) * ((Q.GetCastRange()+me.HullRadius) / HookPosition.Distance2D(me.Position)) + me.Position;
if (me.Position.Distance2D(HookPosition) < CastRange)
{
Q.UseAbility(CastPos); time.Interval = 150 + TimeTurn * 1000;
time.Start();
}
}
else
{
CastPos = (specialPosition - me.Position) * ((Q.GetCastRange() + me.HullRadius) / specialPosition.Distance2D(me.Position)) + me.Position;
if (me.Position.Distance2D(e.NetworkPosition) < CastRange)
{
Q.UseAbility(CastPos);
time.Start();
}
}
}
else
{
if (R.IsInAbilityPhase || R.IsChanneling)
//.........这里部分代码省略.........
示例12: Combo
public void Combo()
{
e = Toolset.ClosestToMouse(me);
if (e == null)
return;
if (!Menu.Item("enabled").IsActive())
return;
//spell
Q = me.Spellbook.SpellQ;
W = me.Spellbook.SpellW;
R = me.Spellbook.SpellR;
// Item
ethereal = me.FindItem("item_ethereal_blade");
sheep = e.ClassID == ClassID.CDOTA_Unit_Hero_Tidehunter ? null : me.FindItem("item_sheepstick");
vail = me.FindItem("item_veil_of_discord");
cheese = me.FindItem("item_cheese");
ghost = me.FindItem("item_ghost");
orchid = me.FindItem("item_orchid") ?? me.FindItem("item_bloodthorn");
atos = me.FindItem("item_rod_of_atos");
soul = me.FindItem("item_soul_ring");
arcane = me.FindItem("item_arcane_boots");
blink = me.FindItem("item_blink");
shiva = me.FindItem("item_shivas_guard");
dagon = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));
force = me.FindItem("item_force_staff");
cyclone = me.FindItem("item_cyclone");
orchid = me.FindItem("item_orchid") ?? me.FindItem("item_bloodthorn");
atos = me.FindItem("item_rod_of_atos");
//me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));
Active = Game.IsKeyDown(Menu.Item("keyBind").GetValue<KeyBind>().Key) && !Game.IsChatOpen;
var modifHex = e.Modifiers.Where(y => y.Name == "modifier_sheepstick_debuff")
.DefaultIfEmpty(null)
.FirstOrDefault();
var modifEther = e.HasModifier("modifier_item_ethereal_blade_slow");
var stoneModif = e.HasModifier("modifier_medusa_stone_gaze_stone");
var eulModifier = e.Modifiers.Where(y => y.Name == "modifier_eul_cyclone").DefaultIfEmpty(null).FirstOrDefault();
var eulModif = e.HasModifier("modifier_eul_cyclone");
var noBlade = e.HasModifier("modifier_item_blade_mail_reflect");
if (me.IsAlive)
{
if (Active && e.IsVisible && me.Distance2D(e) <= 2300 && !noBlade)
{
if (Menu.Item("orbwalk").GetValue<bool>() && me.Distance2D(e) <= 1900 && !eulModif)
{
Orbwalking.Orbwalk(e, 0, 1600, true, true);
}
float angle = me.FindAngleBetween(e.Position, true);
Vector3 pos = new Vector3((float)(e.Position.X - 500 * Math.Cos(angle)), (float)(e.Position.Y - 500 * Math.Sin(angle)), 0);
if (
blink != null
&& me.CanCast()
&& blink.CanBeCasted()
&& me.Distance2D(e) >= me.GetAttackRange()+me.HullRadius
&& me.Distance2D(pos) <= 1180
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(blink.Name)
&& Utils.SleepCheck("blink")
)
{
blink.UseAbility(pos);
Utils.Sleep(250, "blink");
}
if (
cyclone != null
&& cyclone.CanBeCasted()
&& me.Distance2D(e) <= 1100
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(cyclone.Name)
&& W.CanBeCasted()
&& Utils.SleepCheck("cyclone"))
{
cyclone.UseAbility(e);
Utils.Sleep(300, "cyclone");
}
Vector3 start = e.NetworkActivity == NetworkActivity.Move ? new Vector3((float)((W.GetCastDelay(me, e, true) + 0.5) * Math.Cos(e.RotationRad) * e.MovementSpeed + e.Position.X),
(float)((W.GetCastDelay(me, e, true) + 0.5) * Math.Sin(e.RotationRad) * e.MovementSpeed + e.NetworkPosition.Y), e.NetworkPosition.Z) : e.NetworkPosition;
if (W != null && W.CanBeCasted()
&& me.Distance2D(start) <= W.GetCastRange() + me.HullRadius
&& Utils.SleepCheck("w")
&& (eulModifier != null && eulModifier.RemainingTime <= W.GetCastDelay(me, e, true) + 0.5
//.........这里部分代码省略.........
示例13: Combo
//.........这里部分代码省略.........
&& me.CanCast()
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(vail.Name)
&& !e.IsMagicImmune()
&& Utils.SleepCheck("vail")
&& me.Distance2D(e) <= 1500
)
{
vail.UseAbility(e.Position);
}
else elsecount++;
if (orchid != null && orchid.CanBeCasted() &&
Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(orchid.Name))
{
orchid.UseAbility(e);
}
else elsecount++;
if (sheep != null && sheep.CanBeCasted() &&
Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(sheep.Name))
{
sheep.UseAbility(e);
}
else elsecount++;
if (ethereal != null
&& ethereal.CanBeCasted()
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(ethereal.Name))
{
ethereal.UseAbility(e);
}
else elsecount++;
if (Q != null
&& Q.CanBeCasted()
&& (blink == null
|| !blink.CanBeCasted())
&& me.Distance2D(e) < Q.GetCastRange()
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name))
{
Q.UseAbility(pos);
}
else elsecount++;
if (W != null && W.CanBeCasted() && me.Distance2D(e) < 390 &&
Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(W.Name))
{
W.UseAbility();
}
else elsecount++;
if (// Dagon
elsecount == 7 &&
me.CanCast()
&& dagon != null
&& (ethereal == null
|| (e.HasModifier("modifier_item_ethereal_blade_slow")
|| ethereal.Cooldown < 17))
&& !e.IsLinkensProtected()
&& dagon.CanBeCasted()
&& Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled("item_dagon")
&& !e.IsMagicImmune()
&& Utils.SleepCheck("dagon")
)
{
dagon.UseAbility(e);
Utils.Sleep(200, "dagon");
}
else elsecount++; // Dagon Item end
if (elsecount == 8 && Shiva != null
&& Shiva.CanBeCasted()
示例14: Game_OnUpdate
public static void Game_OnUpdate(EventArgs args)
{
if (!isloaded)
{
me = ObjectManager.LocalHero;
if (!Game.IsInGame || me == null)
{
return;
}
if (me.Team == Team.Dire)
foreach (var creepWave in CreepWaves)
creepWave.Coords.Reverse();
isloaded = true;
}
if (me == null || !me.IsValid)
{
isloaded = false;
me = ObjectManager.LocalHero;
return;
}
if (me.ClassID != ClassID.CDOTA_Unit_Hero_Meepo || Game.IsPaused || Game.IsChatOpen)
{
return;
}
var stackKey = Menu.Item("Stack").GetValue<KeyBind>().Active;
var lanePush = Menu.Item("LanePush").GetValue<KeyBind>().Active;
var JungleFarm = Menu.Item("JungleFarm").GetValue<KeyBind>().Active;
_menuValue = Menu.Item("enabledAbilities").GetValue<AbilityToggler>();
W = me.Spellbook.Spell2;
var wRadius = W.GetCastRange() - 30;
var movementspeed = me.MovementSpeed;
travels = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_travel_boots"));
meepos = ObjectMgr.GetEntities<Meepo>().Where(meepo => meepo.Team == me.Team && !meepo.Equals(me)).ToList();
var seconds = ((int)Game.GameTime) % 60;
if (JungleCamps.FindAll(x => x.meepos != null).Count != meepos.Count || seconds == 1)
{
foreach (var camp in JungleCamps)
{
camp.meepos = null;
camp.Stacking = false;
camp.Farming = false;
camp.State = 0;
}
}
if (seconds == 0)
{
foreach (var camp in JungleCamps)
{
camp.meepos = null;
camp.Stacking = false;
camp.Farming = false;
camp.Empty = false;
camp.State = 0;
}
}
#region lanepush
if (lanePush && Utils.SleepCheck("lanePush"))
{
try
{
var creeps =
ObjectManager.GetEntities<Unit>()
.Where(
x =>
x.IsAlive && x.IsVisible && x.Team != me.Team
&& (x.ClassID == ClassID.CDOTA_BaseNPC_Creep_Lane
|| x.ClassID == ClassID.CDOTA_BaseNPC_Creep
|| x.ClassID == ClassID.CDOTA_BaseNPC_Creep_Neutral
|| x.ClassID == ClassID.CDOTA_BaseNPC_Creep_Siege
))
.OrderByDescending(x => x.Distance2D(new Vector3(0, 0, 0))).ToList();
var creepdel = new List<Unit>();
foreach (var creepWave in CreepWaves)
{
creepdel.AddRange(creepWave.Creeps.Where(creep => creeps.All(x => x.Handle != creep.Handle)));
foreach (var creep in creepdel)
creepWave.Creeps.Remove(creep);
}
foreach (var creep in creeps)
{
float[] distance = { float.MaxValue };
var name = "";
foreach (var creepWave in CreepWaves)
{
foreach (var pos in creepWave.Coords.Where(pos => distance[0] > pos.Distance2D(creep)))
{
name = creepWave.Name;
distance[0] = pos.Distance2D(creep);
}
//.........这里部分代码省略.........
示例15: Combo
/* Доп. функции скрипта
-----------------------------------------------------------------------------*/
public void Combo()
{
e = Toolset.ClosestToMouse(me);
if (e.HasModifier("modifier_abaddon_borrowed_time")
|| e.HasModifier("modifier_item_blade_mail_reflect")
|| e.IsMagicImmune())
{
var enemies = ObjectManager.GetEntities<Hero>()
.Where(x => x.IsAlive && x.Team != me.Team && !x.IsIllusion && !x.IsMagicImmune()
&& (!x.HasModifier("modifier_abaddon_borrowed_time")
|| !x.HasModifier("modifier_item_blade_mail_reflect"))
&& x.Distance2D(e) > 200).ToList();
e = GetClosestToTarget(enemies, e) ?? null;
if (Utils.SleepCheck("spam"))
{
Utils.Sleep(5000, "spam");
}
}
if (e == null) return;
//spell
Q = me.Spellbook.SpellQ;
W = me.Spellbook.SpellW;
E = me.Spellbook.SpellE;
R = me.Spellbook.SpellR;
// Item
ethereal = me.FindItem("item_ethereal_blade");
sheep = e.ClassID == ClassID.CDOTA_Unit_Hero_Tidehunter ? null : me.FindItem("item_sheepstick");
vail = me.FindItem("item_veil_of_discord");
cheese = me.FindItem("item_cheese");
ghost = me.FindItem("item_ghost");
orchid = me.FindItem("item_orchid") ?? me.FindItem("item_bloodthorn");
atos = me.FindItem("item_rod_of_atos");
soul = me.FindItem("item_soul_ring");
arcane = me.FindItem("item_arcane_boots");
blink = me.FindItem("item_blink");
shiva = me.FindItem("item_shivas_guard");
dagon = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));
Active = Game.IsKeyDown(Menu.Item("keyBind").GetValue<KeyBind>().Key);
Push = Game.IsKeyDown(Menu.Item("keyQ").GetValue<KeyBind>().Key);
var stoneModif = e.HasModifier("modifier_medusa_stone_gaze_stone");
A();
if (Push && Q != null && Q.CanBeCasted())
{
if (
Q != null
&& Q.CanBeCasted()
&& (e.IsLinkensProtected()
|| !e.IsLinkensProtected())
&& me.CanCast()
&& me.Distance2D(e) < Q.GetCastRange() + me.HullRadius + 24
&& Utils.SleepCheck("Q")
)
{
Q.UseAbility(e);
Utils.Sleep(200, "Q");
}
}
if (Active && me.IsAlive && e.IsAlive && Utils.SleepCheck("activated"))
{
if (stoneModif) return;
//var noBlade = e.HasModifier("modifier_item_blade_mail_reflect");
if (e.IsVisible && me.Distance2D(e) <= 2300)
{
var distance = me.IsVisibleToEnemies ? 1400 : E.GetCastRange() + me.HullRadius;
if (
Q != null
&& Q.CanBeCasted()
&& me.CanCast()
&& e.IsLinkensProtected()
&& !e.IsMagicImmune()
&& me.Distance2D(e) < Q.GetCastRange() + me.HullRadius
&& Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name)
&& Utils.SleepCheck("Q")
)
{
Q.UseAbility(e);
Utils.Sleep(200, "Q");
}
if (
E != null
//.........这里部分代码省略.........