SHOW:
|
|
- or go back to the newest paste.
1 | --[[ | |
2 | Godly Shen beta by jbman | |
3 | - | based on eXtragoZ' scripts |
3 | + | based on eXtragoZ scripts |
4 | ||
5 | Requires the AllClass and Spell Damage Library | |
6 | ||
7 | -Supports Deathfire Grasp, Bilgewater Cutlass, Hextech Gunblade, Sheen, Trinity, Lich Bane and Ignite | |
8 | -Mark killable target with a combo | |
9 | -Target configuration, Press shift to configure | |
10 | -Option to auto ignite when enemy is killable (this affect also for damage calculation) | |
11 | -Auto calculation for Ulti | |
12 | -Notification of when a ally needs an ult (currently @ 25%) | |
13 | -Option to auto ult or cast to ally nearest mouse | |
14 | -In built Melee Last hit | |
15 | -In built Q Last hit | |
16 | ||
17 | COMBOS/Keybinds | |
18 | X - E-Q-AA-W-AA-Q | |
19 | Z - Q-AA-W-AA-Q | |
20 | C - Q-AA-Q | |
21 | O - Move and dash to cursor for escapes | |
22 | T - Toggle Auto ult will dactivate notification (I wait for notification, then decide if I want to activate or not, just in case your ally is an idiot and will get you both killed) | |
23 | Y - Ult @ cursor | |
24 | `(~) - Melee last hit when pressed | |
25 | F1 - Q last hit when held down | |
26 | [ & ] to increase Ult Percentage default = 20% | |
27 | - and + to increase ult range default is 18500 which will get you from top to bottom lane. Max of 22100 will teleport from fountain to fountain. | |
28 | ||
29 | ||
30 | ||
31 | ||
32 | Explanation of the marks: | |
33 | ||
34 | Green circle: Marks the current target to which you will do the combo | |
35 | Blue circle: Mark a target that can be killed with a combo, if all the skills were available | |
36 | Red circle: Mark a target that can be killed using Items + 2 hit + R + E + Q x3 + ignite | |
37 | 2 Red circles: Mark a target that can be killed using Items + 1 hit + R + E + Q x2 + ignite | |
38 | 3 Red circles: Mark a target that can be killed using Items (without Sheen, Trinity and Lich Bane) + R + E + Q | |
39 | ||
40 | ||
41 | Shen Notes: | |
42 | Particles | |
43 | shen_kiStrike_ready_indicator | |
44 | shen_kiStrike_tar | |
45 | - | local unitScanDelay = 250 |
45 | + | |
46 | ||
47 | ||
48 | ]] | |
49 | - | local QwaitDelay = 100 |
49 | + | |
50 | ||
51 | if myHero.charName ~= "Shen" then return end | |
52 | require "AllClass" | |
53 | require "spellDmg" | |
54 | ||
55 | --[[ Melee Last Hit Stuff ]] | |
56 | local mousemoving = true | |
57 | local movedelay = 0 | |
58 | local unitScanDelay = 200 | |
59 | local waitDelay = 300 | |
60 | local scanAdditionalRange = 500 | |
61 | local QunitScanDelay = 100 | |
62 | - | local range = 650 |
62 | + | local QwaitDelay = 200 |
63 | local QscanAdditionalRange = 600 | |
64 | local units = {} | |
65 | local oldDelayTick = 0 | |
66 | local unitScanTick = 0 | |
67 | local holding = 0 | |
68 | local animPlayedTick = nil | |
69 | local nextTick = 0 | |
70 | local RefreshRate = 33 | |
71 | ||
72 | local lasthiton = true | |
73 | ||
74 | - | --Attack Cast stuff |
74 | + | |
75 | local range = 700 | |
76 | local qRange = 500 | |
77 | local tick = nil | |
78 | - | local kiStrike = 0 |
78 | + | |
79 | -- draw | |
80 | - | local minValue = 0.25 |
80 | + | |
81 | local calculationenemy = 1 | |
82 | local floattext = {"Skills are not available","Able to fight","Killable","Murder him!"} | |
83 | local killable = {} | |
84 | -- ts | |
85 | local ts | |
86 | local ecastspeed = 500 | |
87 | --Attack and Cast stuff | |
88 | - | ShenConfig:addParam("DASH", "Dash", SCRIPT_PARAM_ONKEYDOWN, false, 79) |
88 | + | |
89 | local swingDelay = 0.15 | |
90 | local swing = 0 | |
91 | ||
92 | local kiStrike = 0 | |
93 | local taunt = 0 | |
94 | - | ShenConfig:addParam("EQ", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 90) |
94 | + | local lastTaunt = 0 |
95 | local feint = 0 | |
96 | - | ShenConfig:addParam("RALLY", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 89) |
96 | + | local lastFeint = 0 |
97 | ||
98 | --Ult Stuff | |
99 | local SHOWR = false -- Show range of R | |
100 | local ultPct = 20 | |
101 | local ultRange = 18500 | |
102 | local champWarning = 0 | |
103 | local champName = nil | |
104 | local reminder = false | |
105 | local ultQuery = false | |
106 | local ultCast = 0 | |
107 | local lastUlt = 0 | |
108 | --local minValue = 0.25 | |
109 | ||
110 | - | ts = TargetSelector(TARGET_LOW_HP,range+50,DAMAGE_MAGIC,true) |
110 | + | local targetSelected = true |
111 | ||
112 | local ignite = nil | |
113 | local DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot = nil, nil, nil, nil, nil, nil | |
114 | local QREADY, EREADY, RREADY, DFGREADY, HXGREADY, BWCREADY, IREADY = false, false, false, false, false, false, false | |
115 | ||
116 | function OnLoad() | |
117 | ShenConfig = scriptConfig("Shen Combo ", "shencombo") | |
118 | ||
119 | ShenConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 88) | |
120 | ||
121 | ShenConfig:addParam("QQ", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 67) | |
122 | ||
123 | - | if unit.isMe and (spell.name:find("Attack" ) ~= nil) then |
123 | + | ShenConfig:addParam("WQ", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 90) |
124 | ||
125 | ShenConfig:addParam("RALLY", "Ult Ally", SCRIPT_PARAM_ONKEYDOWN, false, 89) | |
126 | ||
127 | ShenConfig:addParam("autoult", "Auto Ult", SCRIPT_PARAM_ONKEYTOGGLE, false, 84) | |
128 | ||
129 | ShenConfig:addParam("autoAAFarm", "Auto AA Farm", SCRIPT_PARAM_ONKEYDOWN, false, 192)--SCRIPT_PARAM_ONKEYTOGGLE | |
130 | ||
131 | ShenConfig:addParam("autoQFarm", "Auto Q Farm", SCRIPT_PARAM_ONKEYDOWN, false, 112)--SCRIPT_PARAM_ONKEYTOGGLE | |
132 | - | PrintFloatText(myHero,0,"kiStrike Detected") |
132 | + | |
133 | ShenConfig:addParam("UltUp", "Ult Up", SCRIPT_PARAM_ONKEYDOWN, false, 221) | |
134 | ||
135 | ShenConfig:addParam("UltDn", "Ult Down", SCRIPT_PARAM_ONKEYDOWN, false, 219) | |
136 | ||
137 | ShenConfig:addParam("UltRangeUp", "Ult R Up", SCRIPT_PARAM_ONKEYDOWN, false, 187) | |
138 | ||
139 | - | PrintFloatText(myHero,0,"kiStrike Gone") |
139 | + | ShenConfig:addParam("UltRangeDn", "Ult R Dn", SCRIPT_PARAM_ONKEYDOWN, false, 189) |
140 | ||
141 | ShenConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true) | |
142 | ShenConfig:addParam("drawtext", "Draw Text", SCRIPT_PARAM_ONOFF, true) | |
143 | ShenConfig:addParam("autoignite", "Auto Ignite", SCRIPT_PARAM_ONOFF, true) | |
144 | ShenConfig:permaShow("autoult") | |
145 | ShenConfig:permaShow("autoAAFarm") | |
146 | ShenConfig:permaShow("autoQFarm") | |
147 | ts = TargetSelector(TARGET_LOW_HP,range+50,DAMAGE_MAGIC) | |
148 | - | if os.clock() > lastBasicAttack + 0.5 then |
148 | + | |
149 | targetSelected = true | |
150 | ts:SetPrediction(ecastspeed) | |
151 | ShenConfig:addTS(ts) | |
152 | if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1 | |
153 | elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2 end | |
154 | for i=1, heroManager.iCount do waittxt[i] = i*3 end | |
155 | PrintChat(">> Shen Combo loaded!") | |
156 | reminder = true | |
157 | ||
158 | end | |
159 | ||
160 | ||
161 | ||
162 | function OnProcessSpell(unit, spell) | |
163 | if unit.isMe and spell and string.find(string.lower(spell.name),"attack" ) then | |
164 | swing = 1 | |
165 | lastBasicAttack = os.clock() | |
166 | end | |
167 | if unit.isMe and spell and string.find(string.lower(spell.name),"shenstandunited" )then | |
168 | ultCast = 1 | |
169 | lastUlt = os.clock() | |
170 | end | |
171 | if unit.isMe and spell and string.find(string.lower(spell.name),"shenfeint" )then | |
172 | feint = 1 | |
173 | lastFeint = os.clock() | |
174 | PrintFloatText(myHero,10,"+S") | |
175 | end | |
176 | end | |
177 | ||
178 | function OnCreateObj(obj) | |
179 | if obj and string.find(string.lower(obj.name),"shen_kistrike_ready_indicator") and GetDistance(obj, myHero) < 100 then | |
180 | kiStrike = 1 | |
181 | PrintFloatText(myHero,0,"+KS") | |
182 | end | |
183 | if obj and string.find(string.lower(obj.name),"shen_shadowdash_unit_impact") and GetDistance(obj, myHero) < 350 then --and string.find(string.lower(obj.name),"global_taunt_multi_unit") then | |
184 | taunt = 1 | |
185 | lastTaunt = os.clock() | |
186 | PrintFloatText(myHero,10,"+T") | |
187 | end | |
188 | end | |
189 | ||
190 | function OnDeleteObj(obj) | |
191 | if obj and string.find(string.lower(obj.name),"shen_kistrike_ready_indicator") and GetDistance(obj, myHero) < 100 then | |
192 | kiStrike = 0 | |
193 | PrintFloatText(myHero,0,"-KS") | |
194 | end | |
195 | if obj and string.find(string.lower(obj.name),"global_taunt_multi_unit") and GetDistance(obj, myHero) < 350 then-- and string.find(string.lower(obj.name),"global_taunt_multi_unit") then | |
196 | taunt = 0 | |
197 | PrintFloatText(myHero,10,"+T") | |
198 | end | |
199 | if obj and string.find(string.lower(obj.name),"shen_feint_self") and GetDistance(obj, myHero) < 100 then-- and string.find(string.lower(obj.name),"global_taunt_multi_unit") then | |
200 | feint = 0 | |
201 | PrintFloatText(myHero,10,"-S") | |
202 | end | |
203 | end | |
204 | ||
205 | ||
206 | - | if ShenConfig.autoAAFarm then |
206 | + | |
207 | ||
208 | function OnTick() | |
209 | if myHero.dead then | |
210 | return | |
211 | end | |
212 | ||
213 | if ShenConfig.UltDn then | |
214 | reminder = false | |
215 | if ultPct > 1 then | |
216 | ultPct = (ultPct-1) | |
217 | end | |
218 | end | |
219 | ||
220 | if ShenConfig.UltUp then | |
221 | reminder = false | |
222 | if ultPct < 100 then | |
223 | ultPct = (ultPct+1) | |
224 | end | |
225 | end | |
226 | ||
227 | if ShenConfig.UltRangeUp then | |
228 | reminder = false | |
229 | if ultRange <= 22000 then | |
230 | ultRange = (ultRange+100) | |
231 | end | |
232 | end | |
233 | ||
234 | if ShenConfig.UltRangeDn then | |
235 | reminder = false | |
236 | if ultRange >= 5000 then | |
237 | ultRange = (ultRange-100) | |
238 | end | |
239 | end | |
240 | ||
241 | ||
242 | if ShenConfig.autoult and not RREADY then | |
243 | if ultCast == 1 and os.clock() > lastUlt + 30 then | |
244 | ultQuery = true | |
245 | elseif ultCast == 1 and os.clock() > lastUlt + 40 then | |
246 | ultQuery = false | |
247 | ultCast = 0 | |
248 | end | |
249 | end | |
250 | ||
251 | ||
252 | if swing == 1 and os.clock() > lastBasicAttack + 0.5 then | |
253 | swing = 0 | |
254 | end | |
255 | ||
256 | - | end |
256 | + | if taunt == 1 and os.clock() > lastTaunt + 2 then |
257 | taunt = 0 | |
258 | end | |
259 | ||
260 | if feint == 1 and os.clock() > lastFeint + 3.5 then | |
261 | feint = 0 | |
262 | end | |
263 | ||
264 | ts:update() | |
265 | ||
266 | - | if enemyhero.health <= (ignitedmg) then |
266 | + | |
267 | QREADY = (myHero:CanUseSpell(_Q) == READY) | |
268 | WREADY = (myHero:CanUseSpell(_W) == READY) | |
269 | EREADY = (myHero:CanUseSpell(_E) == READY) | |
270 | RREADY = (myHero:CanUseSpell(_R) == READY) | |
271 | DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY) | |
272 | HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY) | |
273 | BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY) | |
274 | IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY) | |
275 | ||
276 | if tick == nil or GetTickCount()-tick >= 150 then | |
277 | tick = GetTickCount() | |
278 | - | if not ShenConfig.autoult and Champ.charName ~= myHero.charName and Champ.type == "obj_AI_Hero" and Champ.team == myHero.team and Champ.dead == false and myHero:GetDistance(Champ) < 20000 and (Champ.health / Champ.maxHealth < minValue) then |
278 | + | |
279 | end | |
280 | - | PrintFloatText(myHero,0,"Shield ".. Champ.charName .."!") |
280 | + | |
281 | - | elseif ShenConfig.autoult and Champ.charName ~= myHero.charName and Champ.type == "obj_AI_Hero" and Champ.team == myHero.team and Champ.dead == false and myHero:GetDistance(Champ) < 20000 and (Champ.health / Champ.maxHealth < minValue) then |
281 | + | |
282 | if mousemoving and GetTickCount() > nextTick then | |
283 | player:MoveTo(mousePos.x, mousePos.z) | |
284 | end | |
285 | local tick = GetTickCount() | |
286 | ||
287 | if lasthiton then | |
288 | - | if ShenConfig.RALLY and RREADY then |
288 | + | |
289 | for i = 1, objManager.maxObjects, 1 do | |
290 | local object = objManager:getObject(i) | |
291 | if object ~= nil and object.team ~= player.team and object.type == "obj_AI_Minion" and string.find(object.charName,"Minion") then | |
292 | - | if Champ.type == "obj_AI_Hero" and Champ.charName ~= myHero.charName and Champ.team == myHero.team and Mdistance < 300 and Champ.dead == false and myHero:GetDistance(Champ) < 20000 then |
292 | + | |
293 | if units[object.name] == nil then | |
294 | units[object.name] = { obj = object, markTick = 0 } | |
295 | end | |
296 | else | |
297 | units[object.name] = nil | |
298 | end | |
299 | - | if ShenConfig.DASH then |
299 | + | |
300 | - | player:MoveTo(mousePos.x, mousePos.z) |
300 | + | |
301 | - | if EREADY then CastSpell(_E, mousePos.x, mousePos.z) end |
301 | + | |
302 | for i, unit in pairs(units) do | |
303 | if unit.obj == nil or unit.obj.dead or GetDistance(player,unit.obj) > (player.range + QscanAdditionalRange) then | |
304 | units[i] = nil | |
305 | - | ts:update() |
305 | + | |
306 | - | Prediction__OnTick() -- swing == 1 and os.clock() - lastBasicAttack > swingDelay and |
306 | + | |
307 | if unit.obj.health <= myQ then -- myHero:CalcMagicDamage(unit.obj,getXtraMDmg()) | |
308 | - | if ShenConfig.scriptActive and ts.target then |
308 | + | |
309 | - | if DFGREADY then CastSpell(DFGSlot, ts.target) end |
309 | + | |
310 | - | if HXGREADY then CastSpell(HXGSlot, ts.target) end |
310 | + | |
311 | - | if BWCREADY then CastSpell(BWCSlot, ts.target) end |
311 | + | |
312 | - | if EREADY and ValidTarget(ts.target, range) then CastSpell(_E, ts.target.x, ts.target.z) end |
312 | + | |
313 | - | if QREADY and myHero:CanUseSpell(_E) == COOLDOWN and swing == 0 and (ValidTarget(ts.target, qRange) and GetDistance(ts.target) > 305) then CastSpell(_Q, ts.target) end |
313 | + | |
314 | - | if QREADY and myHero:CanUseSpell(_E) == COOLDOWN and swing == 1 and os.clock() - lastBasicAttack > swingDelay and ValidTarget(ts.target, qRange) then CastSpell(_Q, ts.target) swing = 0 end |
314 | + | |
315 | - | if WREADY and myHero:CanUseSpell(_E) == COOLDOWN and ValidTarget(ts.target, qRange) then CastSpell(_W) end |
315 | + | |
316 | - | if ValidTarget(ts.target, qRange) then myHero:Attack(ts.target) end |
316 | + | |
317 | ||
318 | ||
319 | - | if ShenConfig.EQ and ts.target ~= nil then |
319 | + | if ShenConfig.autoAAFarm then |
320 | - | if DFGREADY then CastSpell(DFGSlot, ts.target) end |
320 | + | |
321 | - | if HXGREADY then CastSpell(HXGSlot, ts.target) end |
321 | + | |
322 | - | if BWCREADY then CastSpell(BWCSlot, ts.target) end |
322 | + | |
323 | local tick = GetTickCount() | |
324 | - | if ValidTarget(ts.target, qRange) then myHero:Attack(ts.target) end |
324 | + | |
325 | - | if WREADY and swing == 1 and os.clock() - lastBasicAttack > swingDelay and ValidTarget(ts.target, qRange) then CastSpell(_W) swing = 0 end |
325 | + | |
326 | - | if QREADY and swing == 0 and (ValidTarget(ts.target, qRange) and GetDistance(ts.target) > 305) then CastSpell(_Q, ts.target) end |
326 | + | |
327 | - | if QREADY and swing == 1 and os.clock() - lastBasicAttack > swingDelay and ValidTarget(ts.target, qRange) then CastSpell(_Q, ts.target) swing = 0 end |
327 | + | |
328 | if object ~= nil and object.team ~= player.team and object.type == "obj_AI_Minion" and string.find(object.charName,"Minion") then | |
329 | if not object.dead and GetDistance(object,player) <= (player.range + scanAdditionalRange) then | |
330 | - | if ShenConfig.QQ and ts.target ~= nil then |
330 | + | |
331 | - | if DFGREADY then CastSpell(DFGSlot, ts.target) end |
331 | + | |
332 | - | if HXGREADY then CastSpell(HXGSlot, ts.target) end |
332 | + | |
333 | - | if BWCREADY then CastSpell(BWCSlot, ts.target) end |
333 | + | |
334 | units[object.name] = nil | |
335 | - | if QREADY and swing == 0 and (ValidTarget(ts.target, qRange) and GetDistance(ts.target) > 305) then CastSpell(_Q, ts.target) end |
335 | + | |
336 | - | if ValidTarget(ts.target, 305) then myHero:Attack(ts.target) end |
336 | + | |
337 | - | if QREADY and swing == 1 and os.clock() - lastBasicAttack > swingDelay and ValidTarget(ts.target, qRange) then CastSpell(_Q, ts.target) swing = 0 end |
337 | + | |
338 | end | |
339 | if kiStrike == 1 then | |
340 | for i, unit in pairs(units) do | |
341 | if unit.obj == nil or unit.obj.dead or GetDistance(player,unit.obj) > (player.range + scanAdditionalRange) then | |
342 | units[i] = nil | |
343 | else | |
344 | local KSdmg = math.floor(getDmg("P",unit.obj,myHero)) | |
345 | if unit.obj.health <= (myHero:CalcDamage(unit.obj,myHero.totalDamage) + KSdmg) then -- myHero:CalcMagicDamage(unit.obj,getXtraMDmg()) | |
346 | if lasthiton and GetTickCount() > nextTick then | |
347 | player:Attack(unit.obj) ---PrintChat("ATTACKING") | |
348 | - | local qdamage = getDmg("Q",enemy,myHero) |
348 | + | |
349 | - | local edamage = getDmg("E",enemy,myHero) |
349 | + | |
350 | - | local rdamage = getDmg("R",enemy,myHero) |
350 | + | |
351 | end | |
352 | end | |
353 | end | |
354 | elseif kiStrike == 0 then | |
355 | - | local ignitedamage = (ignite and getDmg("IGNITE",enemy,myHero) or 0) |
355 | + | |
356 | if unit.obj == nil or unit.obj.dead or GetDistance(player,unit.obj) > (player.range + scanAdditionalRange) then | |
357 | units[i] = nil | |
358 | else | |
359 | - | local combo1 = hitdamage*2 + qdamage*3 + edamage + rdamage + Sheendamage + Trinitydamage + LichBanedamage --0 cd |
359 | + | |
360 | - | local combo2 = hitdamage*2 + Sheendamage + Trinitydamage + LichBanedamage |
360 | + | |
361 | - | local combo3 = hitdamage + Sheendamage + Trinitydamage + LichBanedamage |
361 | + | |
362 | - | local combo4 = 0 |
362 | + | |
363 | return | |
364 | - | combo2 = combo2 + qdamage*3 |
364 | + | |
365 | - | combo3 = combo3 + qdamage*2 |
365 | + | |
366 | - | combo4 = combo4 + qdamage |
366 | + | |
367 | end | |
368 | - | if EREADY then |
368 | + | |
369 | - | combo2 = combo2 + edamage |
369 | + | end |
370 | - | combo3 = combo3 + edamage |
370 | + | |
371 | - | combo4 = combo4 + edamage |
371 | + | |
372 | if ShenConfig.autoignite then | |
373 | - | if RREADY then |
373 | + | |
374 | - | ombo2 = combo2 + rdamage |
374 | + | |
375 | - | combo3 = combo3 + rdamage |
375 | + | |
376 | - | combo4 = combo4 + rdamage |
376 | + | |
377 | if ValidTarget(enemyhero,600) and enemyhero.team ~= myHero.team then | |
378 | - | if DFGREADY then |
378 | + | |
379 | - | combo1 = combo1 + dfgdamage |
379 | + | if enemyhero.health <= (ignitedmg - 33) then |
380 | - | combo2 = combo2 + dfgdamage |
380 | + | |
381 | end | |
382 | end | |
383 | end | |
384 | - | if HXGREADY then |
384 | + | |
385 | - | combo1 = combo1 + hxgdamage |
385 | + | |
386 | - | combo2 = combo2 + hxgdamage |
386 | + | |
387 | ||
388 | if RREADY then | |
389 | for i=1, heroManager.iCount do --(Champ.health / Champ.maxHealth < minValue) then | |
390 | - | if BWCREADY then |
390 | + | |
391 | - | combo1 = combo1 + bwcdamage |
391 | + | if not ShenConfig.autoult and Champ.charName ~= myHero.charName and Champ.type == "obj_AI_Hero" and Champ.team == myHero.team and Champ.dead == false and myHero:GetDistance(Champ) < ultRange and (Champ.health / Champ.maxHealth < ultPct / 100) then |
392 | - | combo2 = combo2 + bwcdamage |
392 | + | |
393 | champName = Champ.charName | |
394 | champWarning = 1 | |
395 | elseif not ShenConfig.autoult and Champ.charName ~= myHero.charName and Champ.type == "obj_AI_Hero" and Champ.team == myHero.team and Champ.dead == false and myHero:GetDistance(Champ) < ultRange and (Champ.health / Champ.maxHealth > ultPct / 100) then | |
396 | - | if IREADY and ShenConfig.autoignite then |
396 | + | champName = nil |
397 | - | combo1 = combo1 + ignitedamage |
397 | + | champWarning = 0 |
398 | - | combo2 = combo2 + ignitedamage |
398 | + | |
399 | --PrintFloatText(myHero,20,"Shield ".. Champ.charName .."!") | |
400 | elseif ShenConfig.autoult and Champ.charName ~= myHero.charName and Champ.type == "obj_AI_Hero" and Champ.team == myHero.team and Champ.dead == false and myHero:GetDistance(Champ) < ultRange and (Champ.health / Champ.maxHealth < ultPct / 100) then | |
401 | CastSpell(_R, Champ) | |
402 | end | |
403 | end | |
404 | end | |
405 | ||
406 | ||
407 | if ShenConfig.autoult and not RREADY then | |
408 | if ultCast == 1 and os.clock() > lastUlt + 30 then | |
409 | ultQuery = true | |
410 | end | |
411 | if ultQuery and ultCast == 1 and os.clock() > lastUlt + 40 then | |
412 | ultQuery = false | |
413 | ultCast = 0 | |
414 | end | |
415 | - | DrawCircle(myHero.x, myHero.y, myHero.z, range, 0xFF00CC) --E range |
415 | + | |
416 | - | DrawCircle(myHero.x, myHero.y, myHero.z, 500, 0x9966CC) --Q range |
416 | + | |
417 | - | DrawCircle(myHero.x, myHero.y, myHero.z, 305, 0x33FFCC) --AA range |
417 | + | |
418 | ||
419 | ||
420 | ||
421 | if ShenConfig.RALLY and RREADY then | |
422 | for i=1, heroManager.iCount do | |
423 | local Champ = heroManager:GetHero(i) | |
424 | local Mdistance = GetDistance(mousePos, Champ) | |
425 | if Champ.type == "obj_AI_Hero" and Champ.charName ~= myHero.charName and Champ.team == myHero.team and Mdistance < 300 and Champ.dead == false then | |
426 | CastSpell(_R, Champ) | |
427 | end | |
428 | end | |
429 | end | |
430 | ||
431 | ||
432 | ||
433 | -- scriptActive | |
434 | if ShenConfig.scriptActive and ValidTarget(ts.target, range) then | |
435 | ||
436 | if DFGREADY then | |
437 | CastSpell(DFGSlot, ts.target) | |
438 | elseif HXGREADY then | |
439 | CastSpell(HXGSlot, ts.target) | |
440 | elseif BWCREADY then | |
441 | CastSpell(BWCSlot, ts.target) | |
442 | end | |
443 | ||
444 | if EREADY and ValidTarget(ts.target, range) then | |
445 | CastSpell(_E, ts.target.x, ts.target.z) | |
446 | end | |
447 | ||
448 | if ValidTarget(ts.target, qRange) then | |
449 | myHero:Attack(ts.target) | |
450 | end | |
451 | ||
452 | if QREADY and myHero:CanUseSpell(_E) == COOLDOWN and swing == 0 then | |
453 | if (ValidTarget(ts.target, qRange) and GetDistance(ts.target) > 305) then | |
454 | CastSpell(_Q, ts.target) | |
455 | end | |
456 | elseif QREADY and myHero:CanUseSpell(_E) == COOLDOWN and swing == 1 then | |
457 | if os.clock() - lastBasicAttack > swingDelay and ValidTarget(ts.target, qRange) then | |
458 | CastSpell(_Q, ts.target) | |
459 | swing = 0 | |
460 | end | |
461 | end | |
462 | if taunt == 0 and WREADY and ValidTarget(ts.target, player.range + 150) then | |
463 | CastSpell(_W) | |
464 | --swing == 0and swing == 1 and os.clock() - lastBasicAttack > swingDelay | |
465 | end | |
466 | ||
467 | end | |
468 | ||
469 | -- WQ | |
470 | if ShenConfig.WQ and ValidTarget(ts.target, range) then | |
471 | ||
472 | if QREADY and swing == 0 then | |
473 | if (ValidTarget(ts.target, range) and GetDistance(ts.target) > 305) then | |
474 | CastSpell(_Q, ts.target) | |
475 | end | |
476 | elseif QREADY and swing == 1 then | |
477 | if os.clock() - lastBasicAttack > swingDelay and ValidTarget(ts.target, qRange) then | |
478 | CastSpell(_Q, ts.target) | |
479 | swing = 0 | |
480 | end | |
481 | end | |
482 | ||
483 | ||
484 | ||
485 | if kiStrike == 1 then | |
486 | if ValidTarget(ts.target, range) then | |
487 | myHero:Attack(ts.target) | |
488 | end | |
489 | elseif kiStrike == 0 then | |
490 | if ValidTarget(ts.target, 350) then | |
491 | myHero:Attack(ts.target) | |
492 | end | |
493 | end | |
494 | ||
495 | if taunt == 0 and WREADY and swing == 1 and os.clock() - lastBasicAttack > swingDelay and ValidTarget(ts.target, qRange) then | |
496 | CastSpell(_W) | |
497 | swing = 0 | |
498 | end | |
499 | ||
500 | if DFGREADY then | |
501 | CastSpell(DFGSlot, ts.target) | |
502 | elseif HXGREADY then | |
503 | CastSpell(HXGSlot, ts.target) | |
504 | elseif BWCREADY then | |
505 | CastSpell(BWCSlot, ts.target) | |
506 | end | |
507 | ||
508 | end | |
509 | ||
510 | ||
511 | if ShenConfig.QQ and ValidTarget(ts.target, range) then | |
512 | ||
513 | if QREADY and swing == 0 then | |
514 | if (ValidTarget(ts.target, range) and GetDistance(ts.target) > 305) then | |
515 | CastSpell(_Q, ts.target) | |
516 | end | |
517 | elseif QREADY and swing == 1 then | |
518 | if os.clock() - lastBasicAttack > swingDelay and ValidTarget(ts.target, qRange) then | |
519 | CastSpell(_Q, ts.target) | |
520 | swing = 0 | |
521 | end | |
522 | end | |
523 | ||
524 | if kiStrike == 1 then | |
525 | if ValidTarget(ts.target, range) then | |
526 | myHero:Attack(ts.target) | |
527 | end | |
528 | elseif kiStrike == 0 then | |
529 | if ValidTarget(ts.target, 350) then | |
530 | myHero:Attack(ts.target) | |
531 | end | |
532 | end | |
533 | ||
534 | if DFGREADY then | |
535 | CastSpell(DFGSlot, ts.target) | |
536 | elseif HXGREADY then | |
537 | CastSpell(HXGSlot, ts.target) | |
538 | elseif BWCREADY then | |
539 | CastSpell(BWCSlot, ts.target) | |
540 | end | |
541 | ||
542 | ||
543 | end | |
544 | ||
545 | end | |
546 | ||
547 | ||
548 | ||
549 | function ShenDmgCalculation() | |
550 | local enemy = heroManager:GetHero(calculationenemy) | |
551 | if ValidTarget(enemy) then | |
552 | local passivedamage = getDmg("P",enemy,myHero) | |
553 | local dfgdamage, hxgdamage, bwcdamage, ignitedamage, Sheendamage, Trinitydamage, LichBanedamage = 0, 0, 0, 0, 0, 0, 0 | |
554 | local qdamage = getDmg("Q",enemy,myHero) | |
555 | local hitdamage = getDmg("AD",enemy,myHero) | |
556 | local dfgdamage = (DFGSlot and getDmg("DFG",enemy,myHero) or 0) | |
557 | local hxgdamage = (HXGSlot and getDmg("HXG",enemy,myHero) or 0) | |
558 | local bwcdamage = (BWCSlot and getDmg("BWC",enemy,myHero) or 0) | |
559 | local ignitedamage = (ignite and (getDmg("IGNITE",enemy,myHero)- 33) or 0) | |
560 | local Sheendamage = (SheenSlot and hitdamage or 0) | |
561 | local Trinitydamage = (TrinitySlot and hitdamage*1.5 or 0) | |
562 | local LichBanedamage = (LichBaneSlot and getDmg("LICHBANE",enemy,myHero) or 0) | |
563 | local combo1 = passivedamage + hitdamage*2 + Sheendamage + Trinitydamage + LichBanedamage --0 cd | |
564 | local combo2 = passivedamage + hitdamage*2 + Sheendamage + Trinitydamage + LichBanedamage | |
565 | local combo3 = passivedamage*2 + hitdamage*3 + qdamage + Sheendamage + Trinitydamage + LichBanedamage | |
566 | local combo4 = passivedamage*2 + hitdamage*4 + qdamage*2 + Sheendamage + Trinitydamage + LichBanedamage | |
567 | if QREADY then | |
568 | combo1 = combo1 + qdamage | |
569 | combo2 = combo2 + qdamage | |
570 | combo3 = combo3 | |
571 | combo4 = combo2 + qdamage | |
572 | end | |
573 | if DFGREADY and QREADY then | |
574 | combo1 = combo1 + dfgdamage + qdamage | |
575 | combo2 = combo2 + dfgdamage + qdamage | |
576 | combo3 = combo3 + dfgdamage | |
577 | combo4 = combo4 + dfgdamage | |
578 | end | |
579 | if HXGREADY and QREADY then | |
580 | combo1 = combo1 + hxgdamage + qdamage | |
581 | combo2 = combo2 + hxgdamage + qdamage | |
582 | combo3 = combo3 + hxgdamage | |
583 | combo4 = combo4 + hxgdamage | |
584 | end | |
585 | if BWCREADY and QREADY then | |
586 | combo1 = combo1 + bwcdamage + qdamage | |
587 | combo2 = combo2 + bwcdamage + qdamage | |
588 | combo3 = combo3 + bwcdamage | |
589 | combo4 = combo4 + bwcdamage | |
590 | end | |
591 | if IREADY and QREADY and ShenConfig.autoignite then | |
592 | combo1 = combo1 + ignitedamage + qdamage | |
593 | combo2 = combo2 + ignitedamage + qdamage | |
594 | combo3 = combo3 + ignitedamage | |
595 | combo4 = combo4 + ignitedamage | |
596 | end | |
597 | if combo4 >= enemy.health then killable[calculationenemy] = 4 | |
598 | elseif combo3 >= enemy.health then killable[calculationenemy] = 3 | |
599 | elseif combo2 >= enemy.health then killable[calculationenemy] = 2 | |
600 | elseif combo1 >= enemy.health then killable[calculationenemy] = 1 | |
601 | else killable[calculationenemy] = 0 end | |
602 | end | |
603 | if calculationenemy == 1 then | |
604 | calculationenemy = heroManager.iCount | |
605 | else | |
606 | calculationenemy = calculationenemy-1 | |
607 | end | |
608 | end | |
609 | function OnDraw() | |
610 | DrawText("\nPercent: "..ultPct.."%",16,50,150,0xFF80FF00) | |
611 | DrawText("\nUlt is: "..ultRange.." range",16,50,200,0xFF80FF00) | |
612 | if RREADY and champWarning == 1 then | |
613 | DrawText("Shield ".. champName .."!",40,850,750,0xFFFF0000) | |
614 | end | |
615 | if ultQuery then | |
616 | DrawText("WARNING! Auto-Ult still active! This message will expire in 10 seconds.",35,500,850,0xFFFF0000) | |
617 | end | |
618 | if reminder then | |
619 | DrawText("Don't forget to set up your Ult! + & - for Ult range, [ & ] for Ult hp %",40,500,750,0xFF80FF08) --0xFF80FF08 | |
620 | end | |
621 | if ShenConfig.drawcircles and not myHero.dead then | |
622 | if SHOWR and RREADY then DrawCircle(myHero.x, myHero.y, myHero.z, ultRange, 0xFF00CC) end--R range | |
623 | if EREADY then DrawCircle(myHero.x, myHero.y, myHero.z, range, 0xFF00CC) end--E range | |
624 | if QREADY then DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x9966CC) end --Q range | |
625 | if kiStrike == 0 then DrawCircle(myHero.x, myHero.y, myHero.z, 350, 0x9966CC) end | |
626 | if ts.target ~= nil then | |
627 | for j=0, 10 do | |
628 | DrawCircle(ts.target.x, ts.target.y, ts.target.z, 40 + j*1.5, 0x00FF00) | |
629 | end | |
630 | end | |
631 | end | |
632 | for i=1, heroManager.iCount do | |
633 | local enemydraw = heroManager:GetHero(i) | |
634 | if ValidTarget(enemydraw) then | |
635 | if ShenConfig.drawcircles then | |
636 | if killable[i] == 1 then | |
637 | for j=0, 20 do | |
638 | DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0x0000FF) | |
639 | end | |
640 | elseif killable[i] == 2 then | |
641 | for j=0, 10 do | |
642 | DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000) | |
643 | end | |
644 | elseif killable[i] == 3 then | |
645 | for j=0, 10 do | |
646 | DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000) | |
647 | DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + j*1.5, 0xFF0000) | |
648 | end | |
649 | elseif killable[i] == 4 then | |
650 | for j=0, 10 do | |
651 | DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000) | |
652 | DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + j*1.5, 0xFF0000) | |
653 | DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 140 + j*1.5, 0xFF0000) | |
654 | end | |
655 | end | |
656 | end | |
657 | if ShenConfig.drawtext and waittxt[i] == 1 and killable[i] ~= 0 then | |
658 | PrintFloatText(enemydraw,0,floattext[killable[i]]) | |
659 | end | |
660 | end | |
661 | if waittxt[i] == 1 then waittxt[i] = 30 | |
662 | else waittxt[i] = waittxt[i]-1 end | |
663 | end | |
664 | SC__OnDraw() | |
665 | end | |
666 | function OnWndMsg(msg,key) | |
667 | SC__OnWndMsg(msg,key) | |
668 | end | |
669 | function OnSendChat(msg) | |
670 | TargetSelector__OnSendChat(msg) | |
671 | ts:OnSendChat(msg, "pri") | |
672 | end |