-
Notifications
You must be signed in to change notification settings - Fork 1
/
iWalker
217 lines (210 loc) · 8.49 KB
/
iWalker
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
--[[
i Walker
by Icy & Eirik
Based on your mothers cunt
Features:
- Orb Walker: Orb walks around the target champion (works with every champion)
- Orb Walker - Auto Attack (VIP only): Orb walks around the closest thing unless there is a champion in range
- Supports: Bilgewater Cutlass, Hextech Gunblade and Blade of the Ruined King
- Auto attack reset detection
- Prevents the cancellation of Katarina and Nunu ults
- Marks the target
- Press shift to configure
I recommend using it any champion
--]]
------ Configuration -------
local OrbWalkerKey = 32
local OrbWalkerKeyAA = GetKey("Y")
---------------------
local SOWConfig, ts, MyTrueRange
local HitBoxSize = 65
local lastAttack = GetTickCount()
local walkDistance = 300
local lastWindUpTime = 0
local lastAttackCD = 0
--Channeling related
local lastAnimation = ""
local lastChanneling = 0
--
function OnLoad()
MyTrueRange = myHero.range + HitBoxSize
SOWConfig = scriptConfig("Simple Orb Walker 1.0", "simpleOrbWalker")
SOWConfig:addParam("OrbWalker", "Orb Walker", SCRIPT_PARAM_ONKEYDOWN, false, OrbWalkerKey)
if VIP_USER then SOWConfig:addParam("OrbWalkerAA", "Orb Walker - Auto Attack", SCRIPT_PARAM_ONKEYDOWN, false, OrbWalkerKeyAA) end
SOWConfig:addParam("attackFocused", "Kite focused targets", SCRIPT_PARAM_ONOFF, false)
SOWConfig:addParam("drawCircles", "Display circles", SCRIPT_PARAM_ONOFF, true)
ts = TargetSelector(TARGET_LESS_CAST_PRIORITY, MyTrueRange, DAMAGE_PHYSICAL, false)
ts.name = "OrbWalker"
SOWConfig:addTS(ts)
PrintChat(" >> iWalker 1.0 loaded!")
end
function OnProcessSpell(object, spell)
if myHero.dead then return end
local spellIsAA = (spell.name:lower():find("attack") or isSpellAttack(spell.name)) and not isNotAttack(spell.name)
if object.isMe then
if spellIsAA then
lastAttack = GetTickCount() - GetLatency()/2
lastWindUpTime = spell.windUpTime*1000
lastAttackCD = spell.animationTime*1000
elseif refreshAttack(spell.name) then
lastAttack = GetTickCount() - GetLatency()/2 - lastAttackCD
end
end
end
function OnTick()
MyTrueRange = myHero.range + HitBoxSize
ts.range = MyTrueRange
ts.targetSelected = SOWConfig.attackFocused
ts:update()
if myHero.dead or myHeroisChanneling() then return end
if SOWConfig.OrbWalker or SOWConfig.OrbWalkerAA then
if (SOWConfig.OrbWalker or SOWConfig.OrbWalkerAA) and ts.target ~= nil and GetDistance(ts.target) - HitBoxSize < MyTrueRange then
if GetDistance(ts.target) <= 500 then
if GetInventoryItemIsCastable(3153) then
CastItem(3153, ts.target)
elseif GetInventoryItemIsCastable(3144) then
CastItem(3144, ts.target)
elseif GetInventoryItemIsCastable(3146) then
CastItem(3146, ts.target)
end
end
if timeToShoot() then
myHero:Attack(ts.target)
elseif heroCanMove() then
moveToCursor()
end
elseif SOWConfig.OrbWalkerAA then
if timeToShoot() then
local moveToPos = myHero + (Vector(mousePos) - myHero):normalized()*walkDistance
Packet("S_MOVE", {type = 7, x = moveToPos.x, y = moveToPos.z}):send()
elseif heroCanMove() then
moveToCursor()
end
elseif heroCanMove() then
moveToCursor()
end
end
end
function heroCanMove()
return (GetTickCount() + GetLatency()/2 > lastAttack + lastWindUpTime + 20)
end
function timeToShoot()
return (GetTickCount() + GetLatency()/2 > lastAttack + lastAttackCD)
end
function moveToCursor()
if GetDistance(mousePos) > 50 or lastAnimation == "Idle1" then
local moveToPos = myHero + (Vector(mousePos) - myHero):normalized()*walkDistance
myHero:MoveTo(moveToPos.x, moveToPos.z)
end
end
function OnDraw()
if not myHero.dead and SOWConfig.drawCircles then
DrawCircle(myHero.x, myHero.y, myHero.z, MyTrueRange, 0x19A712)
if ts.target ~= nil then
for j=0, 5 do DrawCircle(ts.target.x, ts.target.y, ts.target.z, 50 + j*1.5, 0x00FF00) end
end
end
end
--Channeling related
function OnSendPacket(p)
local packet = Packet(p)
if packet:get('name') == 'S_CAST' and packet:get('sourceNetworkId') == myHero.networkID then
local spellId = packet:get('spellId')
if (myHero.charName == "Katarina" and spellId == _R) or (myHero.charName == "Nunu" and spellId == _R) then
lastChanneling = GetTickCount()
end
end
end
function OnAnimation(unit,animationName)
if unit.isMe and lastAnimation ~= animationName then lastAnimation = animationName end
end
function myHeroisChanneling()
return (
(GetTickCount() <= lastChanneling + GetLatency() + 50)
or (myHero.charName == "Katarina" and lastAnimation == "Spell4")
or (myHero.charName == "Nunu" and (lastAnimation == "Spell4" or lastAnimation == "Spell4_Loop"))
)
end
--
function refreshAttack(spellName)
return (
--Blitzcrank
spellName == "PowerFist"
--Darius
or spellName == "DariusNoxianTacticsONH"
--Nidalee
or spellName == "Takedown"
--Sivir
or spellName == "Ricochet"
--Teemo
or spellName == "BlindingDart"
--Vayne
or spellName == "VayneTumble"
--Jax
or spellName == "JaxEmpowerTwo"
--Mordekaiser
or spellName == "MordekaiserMaceOfSpades"
--Nasus
or spellName == "SiphoningStrikeNew"
--Rengar
or spellName == "RengarQ"
--Wukong
or spellName == "MonkeyKingDoubleAttack"
--Yorick
or spellName == "YorickSpectral"
--Vi
or spellName == "ViE"
--Garen
or spellName == "GarenSlash3"
--Hecarim
or spellName == "HecarimRamp"
--XinZhao
or spellName == "XenZhaoComboTarget"
--Leona
or spellName == "LeonaShieldOfDaybreak"
--Shyvana
or spellName == "ShyvanaDoubleAttack"
or spellName == "shyvanadoubleattackdragon"
--Talon
or spellName == "TalonNoxianDiplomacy"
--Trundle
or spellName == "TrundleTrollSmash"
--Volibear
or spellName == "VolibearQ"
--Poppy
or spellName == "PoppyDevastatingBlow"
)
end
function isSpellAttack(spellName)
return (
--Ashe
spellName == "frostarrow"
--Caitlyn
or spellName == "CaitlynHeadshotMissile"
--Quinn
or spellName == "QuinnWEnhanced"
--Trundle
or spellName == "TrundleQ"
--XinZhao
or spellName == "XenZhaoThrust"
or spellName == "XenZhaoThrust2"
or spellName == "XenZhaoThrust3"
--Garen
or spellName == "GarenSlash2"
--Renekton
or spellName == "RenektonExecute"
or spellName == "RenektonSuperExecute"
)
end
function isNotAttack(spellName)
return (
--Shyvana
spellName == "shyvanadoubleattackdragon"
or spellName == "ShyvanaDoubleAttack"
--MonkeyKing
or spellName == "MonkeyKingDoubleAttack"
--JarvanIV
--or spellName == "JarvanIVCataclysmAttack"
--or spellName == "jarvanivcataclysmattack"
)
end