好友
阅读权限10
听众
最后登录1970-1-1
|
本帖最后由 qjtxwork 于 2014-3-15 13:58 编辑
LeagueSharp Release介绍:
LeagueSharp为您提供了一个API,你可以用它来写脚本机器人,检查数据包等,使用自己喜欢的.NET语言。工具进入工具文件夹。支持自动更新功能,所以它会自动(如果可用)下载LeagueSharp的最新版本。该API还处于发展和大刀阔斧的改变,可以在任何时间发生,所有仍然处于实验阶段所以我们期待bug回报,如果你发现问题,回报,我们会尽我所能修复它们。
开始开发LeagueSharp你必须创建一个新的C#控制台程序。添加LeagueSharp.dll,你可以在工具/系统文件夹中找到作为参考。设置目标平台为x86。享受快乐!
核心功能 :
- Extended Zooming
- Reveals everyones ping in the loading screen
- Decent .NET Api
组件需要:
VC++ 2013 Runtime:http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe
.NET 4.5 Runtime:http://download.microsoft.com/download/B/A/4/BA4A7E71-2906-4B2D-A0E1-80CF16844F5F/dotNetFx45_Full_setup.exe
示例脚本:
[Asm] 纯文本查看 复制代码 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LeagueSharp;
using LeagueSharp.Math;
namespace LeagueCarry.Heroes
{
class Cassiopeia : IHero
{
private SpellDataInst _Q;
private SpellDataInst _W;
private SpellDataInst _E;
private SpellData _QSpellData;
private SpellData _WSpellData;
public Cassiopeia()
{
_Q = Unit.Player.Spellbook.Spells[0];
_W = Unit.Player.Spellbook.Spells[1];
_E = Unit.Player.Spellbook.Spells[2];
_QSpellData = _Q.SData;
_WSpellData = _W.SData;
Core.Instance.TargetSelector.Range = 850.0f;
}
public void OnTick()
{
Unit me = Unit.Player;
if (me.IsDead)
return;
bool successfulCast = false;
if (System.Windows.Input.Keyboard.IsKeyDown(System.Windows.Input.Key.Space) && MenuGUI.IsChatOpen == false)
{
Unit target = Core.Instance.TargetSelector.Target;
if (target != null)
{
bool qReady = _Q.State == SpellState.Ready;
bool wReady = _W.State == SpellState.Ready;
bool eReady = _E.State == SpellState.Ready;
if(target.HasBuffOfType(BuffType.Poison)
&& eReady
&& Vector3.Distance(me.Position, target.Position) <= 700
&& me.Mana >= me.Spellbook.GetManaCost(2))
{
me.Spellbook.CastSpell(2, target);
successfulCast = true;
}
if (successfulCast == false
&& qReady
&& Vector3.Distance(me.Position, target.Position) <= 850)
{
Vector3 pos;
if (Core.Instance.Prediction.PredictSkillshot(_QSpellData, target, out pos)
&& Vector3.Distance(me.Position, pos) <= 850)
{
me.Spellbook.CastSpell(0, pos);
successfulCast = true;
}
}
if (successfulCast == false
&& wReady
&& Vector3.Distance(me.Position, target.Position) <= 850)
{
Vector3 pos;
if (Core.Instance.Prediction.PredictSkillshot(_WSpellData, target, out pos)
&& Vector3.Distance(me.Position, pos) <= 850)
{
me.Spellbook.CastSpell(1, pos);
successfulCast = true;
}
}
}
if(successfulCast == false)
{
me.IssueOrder(UnitOrder.MoveTo, Game.CursorPos);
}
}
}
public string Name
{
get { return "Cassiopeia"; }
}
public void OnDraw()
{
Unit target = Core.Instance.TargetSelector.Target;
Drawing.DrawCircle(Unit.Player.Position, _QSpellData.CastRange[0], System.Drawing.Color.White);
Drawing.DrawCircle(Unit.Player.Position, 700.0f, System.Drawing.Color.Red);
if(target != null)
{
Vector3 pos;
bool predicted = Core.Instance.Prediction.PredictSkillshot(_QSpellData, target, out pos);
if(predicted)
{
Drawing.DrawCircle(pos, 75.0f, System.Drawing.Color.Red);
}
}
}
}
}
下载:
LeagueSharp.Loader.zip
(9.78 KB, 下载次数: 372)
|
|
发帖前要善用【论坛搜索】功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。 |
|
|
|
|