-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathYorick.lua
More file actions
106 lines (88 loc) · 4.06 KB
/
Yorick.lua
File metadata and controls
106 lines (88 loc) · 4.06 KB
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
if GetObjectName(GetMyHero()) ~= "Yorick" then
return
end
require('Inspired')
local manaQ = GetCastMana(myHero, _Q, GetCastLevel(myHero,_Q))
local manaW = GetCastMana(myHero, _W, GetCastLevel(myHero,_W))
local manaE = GetCastMana(myHero, _E, GetCastLevel(myHero,_E))
local YorickMenu = MenuConfig("Yorick", "Yorick")
YorickMenu:Menu("Drawings", "Drawings")
YorickMenu:SubMenu("Combo", "Combo")
YorickMenu.Combo:Boolean("Q", "Use Q", true)
YorickMenu.Combo:Boolean("W", "Use W", true)
YorickMenu.Combo:Boolean("E", "Use E", true)
YorickMenu:SubMenu("ksteal", "Killsteal")
YorickMenu.ksteal:Boolean("E", "Use E", true)
YorickMenu.ksteal:Boolean("W", "Use W", true)
YorickMenu.ksteal:Boolean("Q", "Use Q", true)
YorickMenu.Drawings:Boolean("Q", "Draw Q Range", true)
YorickMenu.Drawings:Boolean("W", "Draw W Range", true)
YorickMenu.Drawings:Boolean("E", "Draw E Range", true)
local manaQ = GetCastMana(myHero, _Q, GetCastLevel(myHero,_Q))
local manaW = GetCastMana(myHero, _W, GetCastLevel(myHero,_W))
local manaE = GetCastMana(myHero, _E, GetCastLevel(myHero,_E))
OnDraw(function(myHero)
local pos = GetOrigin(myHero)
if YorickMenu.Drawings.Q:Value() then DrawCircle(pos,175,1,10,GoS.Red) end
if YorickMenu.Drawings.W:Value() then DrawCircle(pos,600,1,10,GoS.Yellow) end
if YorickMenu.Drawings.E:Value() then DrawCircle(pos,550,1,10,GoS.Pink) end
end)
function Killsteal()
if igniteFound and YorickMenu.ksteal.ignite:Value() and Ready(summonerSpells.ignite) then
local iDamage = (50 + (20 * GetLevel(myHero)))
for _, enemy in pairs(GetEnemyHeroes()) do
if ValidTarget(enemy, 600) and GetCurrentHP(enemy) <= iDamage then
CastTargetSpell(enemy, summonerSpells.ignite)
end
end
end
if igniteFound and YorickMenu.ksteal.ignite:Value() and Ready(summonerSpells.ignite) and (rLevel ~= (nil or 0)) and Ready(_R) and YorickMenu.ksteal.R:Value() then
for _, enemy in pairs(GetEnemyHeroes()) do
local riDamage = math.ceil(CalcDamage(myHero, enemy, 0, (ultbase + ((GetMaxHP(enemy) - GetCurrentHP(enemy)) * (percent / 100)))) + (50 + (20 * GetLevel(myHero))))
if ValidTarget(enemy, 400) and (GetCurrentHP(enemy) <= riDamage) then
CastTargetSpell(enemy, summonerSpells.ignite)
DelayAction(function() CastTargetSpell(enemy, _R) end, 0.02)
end
end
end
if (eLevel ~= (nil or 0)) and Ready(_E) and YorickMenunu.ksteal.E:Value() then
for _, enemy in pairs(GetEnemyHeroes()) do
local eDamage = math.ceil(CalcDamage(myHero, enemy, 0, (ultbase + ((GetMaxHP(enemy) - GetCurrentHP(enemy)) * (percent / 100)))))
if (GetCurrentHP(enemy) <= eDamage) and Ready(_E) and ValidTarget(enemy, 170) then
CastTargetSpell(enemy, _E)
end
end
end
if (wLevel ~= (nil or 0)) and Ready(_W) and YorickMenunu.ksteal.W:Value() then
for _, enemy in pairs(GetEnemyHeroes()) do
local wDamage = math.ceil(CalcDamage(myHero, enemy, 0, (ultbase + ((GetMaxHP(enemy) - GetCurrentHP(enemy)) * (percent / 100)))))
if (GetCurrentHP(enemy) <= wDamage) and Ready(_W) and ValidTarget(enemy, 170) then
CastTargetSpell(enemy, _W)
end
end
end
if (qLevel ~= (nil or 0)) and Ready(_Q) and YorickMenunu.ksteal.Q:Value() then
for _, enemy in pairs(GetEnemyHeroes()) do
local qDamage = math.ceil(CalcDamage(myHero, enemy, 0, (ultbase + ((GetMaxHP(enemy) - GetCurrentHP(enemy)) * (percent / 100)))))
if (GetCurrentHP(enemy) <= qDamage) and Ready(_Q) and ValidTarget(enemy, 85) then
CastTargetSpell(enemy, _Q)
end
end
end
end
OnTick(function(myHero)
local target = GetCurrentTarget()
if GetCurrentMana(myHero) > manaQ + manaW + manaE and IOW:Mode() == "Combo" then
if YorickMenu.Combo.Q:Value() and Ready(_Q) and ValidTarget(target, 175) then
CastSpell(_Q)
end
if YorickMenu.Combo.W:Value() and Ready(_W) and ValidTarget(target, 550) then
local targetPos = GetOrigin(target)
CastSkillShot(_W , targetPos)
end
if YorickMenu.Combo.E:Value() and Ready(_E) and ValidTarget(target, 550) then
local targetPos = GetOrigin(target)
CastTargetSpell(target, _E)
end
end
end)