-
Notifications
You must be signed in to change notification settings - Fork 1
/
LeeSin - The Blind Monk.lua
698 lines (585 loc) · 24.6 KB
/
LeeSin - The Blind Monk.lua
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
if myHero.charName ~= "LeeSin" then return end
-- Version 2.26
-- Scriptstatus --
assert(load(Base64Decode("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"), nil, "bt", _ENV))() ScriptStatus("WJMKLNKJKQM")
--[[
/$$ /$$$$$$ /$$
| $$ /$$__ $$|__/
| $$ /$$$$$$ /$$$$$$ | $$ \__/ /$$ /$$$$$$$
| $$ /$$__ $$ /$$__ $$ | $$$$$$ | $$| $$__ $$
| $$ | $$$$$$$$| $$$$$$$$ \____ $$| $$| $$ \ $$
| $$ | $$_____/| $$_____/ /$$ \ $$| $$| $$ | $$
| $$$$$$$$| $$$$$$$| $$$$$$$ | $$$$$$/| $$| $$ | $$
|________/ \_______/ \_______/ \______/ |__/|__/ |__/
/$$$$$$$$ /$$ /$$$$$$$ /$$ /$$ /$$ /$$ /$$ /$$
|__ $$__/| $$ | $$__ $$| $$|__/ | $$ | $$$ /$$$ | $$
| $$ | $$$$$$$ /$$$$$$ | $$ \ $$| $$ /$$ /$$$$$$$ /$$$$$$$ | $$$$ /$$$$ /$$$$$$ /$$$$$$$ | $$ /$$
| $$ | $$__ $$ /$$__ $$ | $$$$$$$ | $$| $$| $$__ $$ /$$__ $$ | $$ $$/$$ $$ /$$__ $$| $$__ $$| $$ /$$/
| $$ | $$ \ $$| $$$$$$$$ | $$__ $$| $$| $$| $$ \ $$| $$ | $$ | $$ $$$| $$| $$ \ $$| $$ \ $$| $$$$$$/
| $$ | $$ | $$| $$_____/ | $$ \ $$| $$| $$| $$ | $$| $$ | $$ | $$\ $ | $$| $$ | $$| $$ | $$| $$_ $$
| $$ | $$ | $$| $$$$$$$ | $$$$$$$/| $$| $$| $$ | $$| $$$$$$$ | $$ \/ | $$| $$$$$$/| $$ | $$| $$ \ $$
|__/ |__/ |__/ \_______/ |_______/ |__/|__/|__/ |__/ \_______/ |__/ |__/ \______/ |__/ |__/|__/ \__/
*changelog 09.02.2015
Started with the Menu
*changelog 10.02.2015
finshed so far menu and started with Variables
*changelog addet Item Fix to ite
*changelog accurated some casts
*changelog addet autoupdate
*19.04.2015 changed some little stuff backuped Huntres Lee Sin Acurated some CastSpell
*Do not Change in Misc "Do Not Touch this" the prediction option is not working Acurate use normal one which is working smoothly
--]]
require 'VPrediction'
local qRange, qDelay, qSpeed, qWidth = 1050, 0.25, 1800, 60
local allyMinions = {}
local lastTime, lastTimeQ, bonusDmg = 0, 0, 0
local qDmgs = {50, 80, 110, 140, 170}
local useSight, lastWard, targetObj, friendlyObj = nil, nil, nil, nil
local VP, ts = nil, nil
function OnLoad()
mumyc = scriptConfig("Lee Sin Combo", "LeeSinCombo")
mumyc:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
mumyc:addParam("insecMake", "Insec", SCRIPT_PARAM_ONKEYDOWN, false, 84)
mumyc:addParam("harass", "Harass", SCRIPT_PARAM_ONKEYDOWN, false, 71)
mumyc:addParam("wardJump", "Ward Jump", SCRIPT_PARAM_ONKEYDOWN, false, 67)
mumyc:addSubMenu("Draw settings", "draws")
mumyc.draws:addParam("drawInsec", "Draw InSec Line", SCRIPT_PARAM_ONOFF, true)
mumyc.draws:addParam("drawQ", "Draw Q Range", SCRIPT_PARAM_ONOFF, false)
mumyc:addSubMenu("Misc settings", "miscs")
mumyc.miscs:addParam("wardJumpmax", "Ward Jump on max range if mouse too far", SCRIPT_PARAM_ONOFF, true)
mumyc.miscs:addParam("predInSec", "Do Not Touch This !", SCRIPT_PARAM_ONOFF, false)
mumyc.miscs:addParam("following", "Follow while combo", SCRIPT_PARAM_ONOFF, true)
mumyc:addSubMenu("Use ult", "useUlt")
for i=1, heroManager.iCount do
local enemy = heroManager:GetHero(i)
if enemy.team ~= myHero.team then
mumyc.useUlt:addParam("ult"..enemy.charName, "Use ult on "..enemy.charName, SCRIPT_PARAM_ONOFF, true)
end
end
allyMinions = minionManager(MINION_ALLY, 1050, myHero, MINION_SORT_HEALTH_DES)
ts = TargetSelector(TARGET_LESS_CAST_PRIORITY, 1050, DAMAGE_PHYSICAL)
ts.name = "Lee Sin"
mumyc:addTS(ts)
VP = VPrediction()
mumyc:permaShow("scriptActive")
mumyc:permaShow("insecMake")
mumyc:permaShow("harass")
mumyc:permaShow("wardJump")
print("<font color=\"#DF7401\"><b>Lee Sin - The Blind Monk (BETA): </b></font><font color=\"#D7DF01\">Ver 2.01</b></font>")
ItemNames = {
[3303] = "ArchAngelsDummySpell",
[3007] = "ArchAngelsDummySpell",
[3144] = "BilgewaterCutlass",
[3188] = "ItemBlackfireTorch",
[3153] = "ItemSwordOfFeastAndFamine",
[3405] = "TrinketSweeperLvl1",
[3411] = "TrinketOrbLvl1",
[3166] = "TrinketTotemLvl1",
[3450] = "OdinTrinketRevive",
[2041] = "ItemCrystalFlask",
[2054] = "ItemKingPoroSnack",
[2138] = "ElixirOfIron",
[2137] = "ElixirOfRuin",
[2139] = "ElixirOfSorcery",
[2140] = "ElixirOfWrath",
[3184] = "OdinEntropicClaymore",
[2050] = "ItemMiniWard",
[3401] = "HealthBomb",
[3363] = "TrinketOrbLvl3",
[3092] = "ItemGlacialSpikeCast",
[3460] = "AscWarp",
[3361] = "TrinketTotemLvl3",
[3362] = "TrinketTotemLvl4",
[3159] = "HextechSweeper",
[2051] = "ItemHorn",
--[2003] = "RegenerationPotion",
[3146] = "HextechGunblade",
[3187] = "HextechSweeper",
[3190] = "IronStylus",
[2004] = "FlaskOfCrystalWater",
[3139] = "ItemMercurial",
[3222] = "ItemMorellosBane",
[3042] = "Muramana",
[3043] = "Muramana",
[3180] = "OdynsVeil",
[3056] = "ItemFaithShaker",
[2047] = "OracleExtractSight",
[3364] = "TrinketSweeperLvl3",
[2052] = "ItemPoroSnack",
[3140] = "QuicksilverSash",
[3143] = "RanduinsOmen",
[3074] = "ItemTiamatCleave",
[3800] = "ItemRighteousGlory",
[2045] = "ItemGhostWard",
[3342] = "TrinketOrbLvl1",
[3040] = "ItemSeraphsEmbrace",
[3048] = "ItemSeraphsEmbrace",
[2049] = "ItemGhostWard",
[3345] = "OdinTrinketRevive",
[2044] = "SightWard",
[3341] = "TrinketSweeperLvl1",
[3069] = "shurelyascrest",
[3599] = "KalistaPSpellCast",
[3185] = "HextechSweeper",
[3077] = "ItemTiamatCleave",
[2009] = "ItemMiniRegenPotion",
[2010] = "ItemMiniRegenPotion",
[3023] = "ItemWraithCollar",
[3290] = "ItemWraithCollar",
[2043] = "VisionWard",
[3340] = "TrinketTotemLvl1",
[3090] = "ZhonyasHourglass",
[3154] = "wrigglelantern",
[3142] = "YoumusBlade",
[3157] = "ZhonyasHourglass",
[3512] = "ItemVoidGate",
[3131] = "ItemSoTD",
[3137] = "ItemDervishBlade",
[3352] = "RelicSpotter",
[3350] = "TrinketTotemLvl2",
}
_G.ITEM_1 = 06
_G.ITEM_2 = 07
_G.ITEM_3 = 08
_G.ITEM_4 = 09
_G.ITEM_5 = 10
_G.ITEM_6 = 11
_G.ITEM_7 = 12
___GetInventorySlotItem = rawget(_G, "GetInventorySlotItem")
_G.GetInventorySlotItem = GetSlotItem
PrintChat("Item Casting Temp-Fix by Devn!")
end
function GetSlotItem(id, unit)
unit = unit or myHero
if (not ItemNames[id]) then
return ___GetInventorySlotItem(id, unit)
end
local name = ItemNames[id]
for slot = ITEM_1, ITEM_7 do
local item = unit:GetSpellData(slot).name
if ((#item > 0) and (item:lower() == name:lower())) then
return slot
end
end
end
function OnTick()
if myHero.dead then
return
end
if not canAutoMove() then
return
end
local SIGHTlot = GetInventorySlotItem(2049)
local SIGHTREADY = (SIGHTlot ~= nil and myHero:CanUseSpell(SIGHTlot) == READY)
local SIGHTlot2 = GetInventorySlotItem(2045)
local SIGHTREADY2 = (SIGHTlot2 ~= nil and myHero:CanUseSpell(SIGHTlot2) == READY)
local SIGHTlot3 = GetInventorySlotItem(3340)
local SIGHTREADY3 = (SIGHTlot3 ~= nil and myHero:CanUseSpell(SIGHTlot3) == READY)
local SIGHTlot4 = GetInventorySlotItem(2044)
local SIGHTREADY4 = (SIGHTlot4 ~= nil and myHero:CanUseSpell(SIGHTlot4) == READY)
local SIGHTlot5 = GetInventorySlotItem(3361)
local SIGHTREADY5 = (SIGHTlot5 ~= nil and myHero:CanUseSpell(SIGHTlot5) == READY)
local SIGHTlot6 = GetInventorySlotItem(3362)
local SIGHTREADY6 = (SIGHTlot6 ~= nil and myHero:CanUseSpell(SIGHTlot6) == READY)
local SIGHTlot7 = GetInventorySlotItem(3154)
local SIGHTREADY7 = (SIGHTlot7 ~= nil and myHero:CanUseSpell(SIGHTlot7) == READY)
local SIGHTlot8 = GetInventorySlotItem(3160)
local SIGHTREADY8 = (SIGHTlot8 ~= nil and myHero:CanUseSpell(SIGHTlot8) == READY)
useSight = nil
if SIGHTREADY then
useSight = SIGHTlot
elseif SIGHTREADY2 then
useSight = SIGHTlot2
elseif SIGHTREADY7 then
useSight = SIGHTlot7
elseif SIGHTREADY8 then
useSight = SIGHTlot8
elseif SIGHTREADY3 then
useSight = SIGHTlot3
elseif SIGHTREADY5 then
useSight = SIGHTlot5
elseif SIGHTREADY6 then
useSight = SIGHTlot6
elseif SIGHTREADY4 then
useSight = SIGHTlot4
end
bonusDmg = myHero.addDamage * 0.90
local target = GetTarget()
if target ~= nil then
if string.find(target.type, "Hero") and target.team ~= myHero.team then
targetObj = target
elseif target.team == myHero.team then
friendlyObj = target
end
end
if mumyc.insecMake then
if insec() then return end
end
if mumyc.scriptActive or mumyc.insecMake then
local inseca = nil
if mumyc.insecMake then inseca = targetObj end
combo(inseca)
return
end
if mumyc.wardJump then
wardJump()
return
end
if mumyc.harass then
harass()
end
end
function harass()
for i=1, heroManager.iCount do
local target = heroManager:GetHero(i)
if ValidTarget(target, 1050) then
if myHero:CanUseSpell(_Q) == READY then
if myHero:GetSpellData(_Q).name == "BlindMonkQOne" then
local CastPosition, HitChance, Position = VP:GetLineCastPosition(target, qDelay, qWidth, qRange, qSpeed, myHero, true)
if HitChance >= 2 then
CastSpell(_Q, CastPosition.x, CastPosition.z)
return
end
elseif targetHasQ(target) then
if myHero:CanUseSpell(_W) == READY and myHero:GetSpellData(_W).name == "BlindMonkWOne" and enemiesAround(1500) == 1 and myHero.mana >= 80 and (myHero.health / myHero.maxHealth) > 0.5 then
allyMinions:update()
for i, minion in pairs(allyMinions.objects) do
if minion ~= nil and minion.valid then
local distMinionTarget = GetDistance(target, minion)
if distMinionTarget > 450 and distMinionTarget < 650 then
CastSpell(_Q)
return
end
end
end
end
end
end
if myHero:CanUseSpell(_Q) ~= READY and myHero:CanUseSpell(_E) == READY and myHero:GetSpellData(_E).name == "BlindMonkEOne" and enemiesAround(375) >= 1 and myHero.mana >= 100 then
CastSpell(_E)
return
end
if myHero:CanUseSpell(_Q) ~= READY and myHero:CanUseSpell(_W) == READY and myHero:GetSpellData(_W).name == "BlindMonkWOne" and enemiesAround(300) >= 1 then
allyMinions:update()
local maxDist = 0
local miniona = nil
for i, minion in pairs(allyMinions.objects) do
if minion ~= nil and minion.valid then
local distMinionTarget = GetDistance(target, minion)
if distMinionTarget > 450 and distMinionTarget < 650 and distMinionTarget > maxDist then
miniona = minion
maxDist = distMinionTarget
end
end
end
if miniona ~= nil then
CastSpell(_W, miniona)
end
end
end
end
end
function enemiesAround(range)
local playersCount = 0
for i=1, heroManager.iCount do
local target = heroManager:GetHero(i)
if ValidTarget(target, range) then
playersCount = playersCount + 1
end
end
return playersCount
end
function wardJump()
if myHero:CanUseSpell(_W) == READY and myHero:GetSpellData(_W).name == "BlindMonkWOne" then
if lastTime > (GetTickCount() - 1000) then
if (GetTickCount() - lastTime) >= 10 then
CastSpell(_W, lastWard)
end
elseif useSight ~= nil then
local wardX = mousePos.x
local wardZ = mousePos.z
if mumyc.miscs.wardJumpmax then
local distanceMouse = GetDistance(myHero, mousePos)
if distanceMouse > 600 then
wardX = myHero.x + (600 / distanceMouse) * (mousePos.x - myHero.x)
wardZ = myHero.z + (600 / distanceMouse) * (mousePos.z - myHero.z)
end
end
CastSpell(useSight, wardX, wardZ)
end
end
end
function OnCreateObj(object)
if myHero.dead then return end
if mumyc.wardJump or mumyc.insecMake then
if object ~= nil and object.valid and (object.name == "VisionWard" or object.name == "SightWard") then
lastWard = object
lastTime = GetTickCount()
end
end
end
local lastWardInsec = 0
function insec()
if myHero:CanUseSpell(_R) == READY and friendlyObj ~= nil and targetObj ~= nil and friendlyObj.valid and targetObj.valid and ValidTarget(targetObj) then
if myHero:GetDistance(targetObj) < 375 then
local dPredict = GetDistance(targetObj, myHero)
local xE = myHero.x + ((dPredict + 500) / dPredict) * (targetObj.x - myHero.x)
local zE = myHero.z + ((dPredict + 500) / dPredict) * (targetObj.z - myHero.z)
local positiona = {}
positiona.x = xE
positiona.z = zE
local newDistance = GetDistance(friendlyObj, targetObj) - GetDistance(friendlyObj, positiona)
if newDistance > 0 and (newDistance / 500) > 0.7 then
CastSpell(_R, targetObj)
return true
end
end
if myHero:CanUseSpell(_W) == READY and myHero:GetSpellData(_W).name == "BlindMonkWOne" then
if lastTime > (GetTickCount() - 1000) then
if (GetTickCount() - lastTime) >= 10 then
CastSpell(_W, lastWard)
lastWardInsec = os.clock() + 0.5
return true
end
elseif useSight ~= nil then
local targetObj2 = nil
if mumyc.miscs.predInSec then
targetObj2, HitChance = VP:GetPredictedPos(targetObj, 0.25, 2000, myHero)
else
targetObj2 = targetObj
end
local wardDistance = 300
local dPredict = GetDistance(targetObj2, friendlyObj)
local xE = friendlyObj.x + ((dPredict + wardDistance) / dPredict) * (targetObj2.x - friendlyObj.x)
local zE = friendlyObj.z + ((dPredict + wardDistance) / dPredict) * (targetObj2.z - friendlyObj.z)
local positiona = {}
positiona.x = xE
positiona.z = zE
if GetDistance(myHero, positiona) < 600 then
CastSpell(useSight, xE, zE)
return true
end
end
end
end
return false
end
function OnProcessSpell(unit, spell)
if unit.name == myHero.name then
if spell.name == "BlindMonkQOne" then
lastTimeQ = GetTickCount()
end
end
end
function combo(inseca)
local QREADY = (myHero:CanUseSpell(_Q) == READY)
local WREADY = (myHero:CanUseSpell(_W) == READY)
local EREADY = (myHero:CanUseSpell(_E) == READY)
local RREADY = (myHero:CanUseSpell(_R) == READY)
local TIAMATSlot = GetInventorySlotItem(3077)
local TIAMATREADY = (TIAMATSlot ~= nil and myHero:CanUseSpell(TIAMATSlot) == READY)
local HYDRASlot = GetInventorySlotItem(3074)
local HYDRAREADY = (HYDRASlot ~= nil and myHero:CanUseSpell(HYDRASlot) == READY)
local BLADESLot = GetInventorySlotItem(3153)
local BLADEREADY = (BLADESLot ~= nil and myHero:CanUseSpell(BLADESLot) == READY)
local BILGESlot = GetInventorySlotItem(3144)
local BILGEREADY = (BILGESlot ~= nil and myHero:CanUseSpell(BILGESlot) == READY)
local RANDSlot = GetInventorySlotItem(3143)
local RANDREADY = (RANDSlot ~= nil and myHero:CanUseSpell(RANDSlot) == READY)
local bladeaSlot = GetInventorySlotItem(3142)
local bladeaaREADY = (bladeaSlot ~= nil and myHero:CanUseSpell(bladeaSlot) == READY)
local focusEnemy = nil
local minimumHit = -1
local lowPriority = false
local rangeFocus = 400
if QREADY then
rangeFocus = 1000
end
local insecOk = false
if inseca ~= nil and inseca.valid and ValidTarget(inseca) then
focusEnemy = inseca
insecOk = true
else
ts:update()
focusEnemy = ts.target
end
if focusEnemy ~= nil then
if QREADY then
if myHero:GetSpellData(_Q).name == "BlindMonkQOne" then
local CastPosition, HitChance, Position = VP:GetLineCastPosition(focusEnemy, qDelay, qWidth, qRange, qSpeed, myHero, true)
if HitChance >= 2 then
CastSpell(_Q, CastPosition.x, CastPosition.z)
return
end
elseif targetHasQ(focusEnemy) and (myHero:GetDistance(focusEnemy) > 500 or insecOk or (getQDmg(focusEnemy, 0) + getDmg("AD", focusEnemy, myHero)) > focusEnemy.health or (GetTickCount() - lastTimeQ) > 2500) then
if insecOk then
lastWardInsec = os.clock() + 1
end
CastSpell(_Q)
return
end
end
if EREADY and (not insecOk or not RREADY or os.clock() > lastWardInsec) then
if myHero:GetSpellData(_E).name == "BlindMonkEOne" and enemiesAround(300) >= 1 then
CastSpell(_E)
return
elseif enemiesAround(450) >= 1 and myHero:GetSpellData(_E).name ~= "BlindMonkEOne" then
CastSpell(_E)
return
end
end
if RREADY and mumyc.useUlt["ult"..focusEnemy.charName] and myHero:GetDistance(focusEnemy) <= 375 then
local prociR = getDmg("R", focusEnemy, myHero) / focusEnemy.health
local healthLeft = focusEnemy.health - getDmg("R", focusEnemy, myHero)
if (prociR > 1 and prociR < 2.5) or (getQDmg(focusEnemy, healthLeft) > healthLeft and targetHasQ(focusEnemy) and QREADY) then
CastSpell(_R, focusEnemy)
return
end
end
if WREADY and not insecOk then
if myHero:GetSpellData(_W).name ~= "BlindMonkWOne" and (myHero.health / myHero.maxHealth) < 0.6 then
CastSpell(_W)
return
end
end
if BILGEREADY and myHero:GetDistance(focusEnemy) < 450 then
CastSpell(BILGESlot, focusEnemy)
return
end
if BLADEREADY and myHero:GetDistance(focusEnemy) < 450 then
CastSpell(BLADESLot, focusEnemy)
return
end
if TIAMATREADY and enemiesAround(350) >= 1 then
CastSpell(TIAMATSlot)
return
end
if HYDRAREADY and (enemiesAround(350) >= 2 or (getDmg("AD", focusEnemy, myHero) < focusEnemy.health and enemiesAround(350) == 1)) then
CastSpell(HYDRASlot)
return
end
if RANDREADY and enemiesAround(450) >= 1 then
CastSpell(RANDSlot)
return
end
if canAutoMove() then
myHero:Attack(focusEnemy)
return
end
end
if mumyc.miscs.following then
myHero:MoveTo(mousePos.x, mousePos.z)
end
end
function targetHasQ(target)
local dd = false
for b=1, target.buffCount do
local buff = target:getBuff(b)
if buff.valid and (buff.name == "BlindMonkQOne" or buff.name == "blindmonkqonechaos") and (buff.endT - GetGameTimer()) >= 0.3 then
dd = true
break
end
end
return dd
end
function getQDmg(target, health)
local dmg = 0
local qDMG = 0
if myHero:CanUseSpell(_Q) == READY then
local spellQ = myHero:GetSpellData(_Q)
if spellQ.name == "BlindMonkQOne" then
qDMG = qDmgs[spellQ.level] + bonusDmg
else
local dmgHealth = (target.maxHealth - target.health) * 0.08
if health > 0 then
dmgHealth = (target.maxHealth - health) * 0.08
end
qDMG = qDmgs[spellQ.level] + bonusDmg + dmgHealth
end
end
if qDMG > 0 then
dmg = myHero:CalcDamage(target, qDMG)
end
return dmg
end
function canAutoMove()
local linea = nil
local file = io.open(SCRIPT_PATH.."movementblock.txt", "r")
if file ~= nil then
for line in file:lines() do linea = line break end
file:close()
end
if linea == "1" then
return false
else
return true
end
end
function DrawLine3Dcustom(x1, y1, z1, x2, y2, z2, width, color)
local p = WorldToScreen(D3DXVECTOR3(x1, y1, z1))
local px, py = p.x, p.y
local c = WorldToScreen(D3DXVECTOR3(x2, y2, z2))
local cx, cy = c.x, c.y
DrawLine(cx, cy, px, py, width or 1, color or 4294967295)
end
function OnDraw()
if mumyc.draws.drawQ then
DrawCircle(myHero.x, myHero.y, myHero.z, 1050, 0x25de69)
end
local QREADY = (myHero:CanUseSpell(_Q) == READY)
local WREADY = (myHero:CanUseSpell(_W) == READY)
local EREADY = (myHero:CanUseSpell(_E) == READY)
local RREADY = (myHero:CanUseSpell(_R) == READY)
local spellQ = myHero:GetSpellData(_Q)
if RREADY and WREADY then
if useSight ~= nil then
local validTargets = 0
if targetObj ~= nil and targetObj.valid and ValidTarget(targetObj) then
DrawCircle(targetObj.x, targetObj.y, targetObj.z, 70, 0x00CC00)
validTargets = validTargets + 1
end
if friendlyObj ~= nil and friendlyObj.valid then
DrawCircle(friendlyObj.x, friendlyObj.y, friendlyObj.z, 70, 0x00CC00)
validTargets = validTargets + 1
end
if validTargets == 2 and mumyc.draws.drawInsec then
local dPredict = GetDistance(targetObj, friendlyObj)
local rangeR = 300
if myHero:GetDistance(targetObj) <= 1100 then
rangeR = 800
end
local xQ = targetObj.x + (rangeR / dPredict) * (friendlyObj.x - targetObj.x)
local zQ = targetObj.z + (rangeR / dPredict) * (friendlyObj.z - targetObj.z)
local positiona = {}
positiona.x = xQ
positiona.z = zQ
DrawLine3Dcustom(targetObj.x, targetObj.y, targetObj.z, positiona.x, targetObj.y, positiona.z, 2)
end
end
end
local TIAMATSlot = GetInventorySlotItem(3077)
local TIAMATREADY = (TIAMATSlot ~= nil and myHero:CanUseSpell(TIAMATSlot) == READY)
local HYDRASlot = GetInventorySlotItem(3074)
local HYDRAREADY = (HYDRASlot ~= nil and myHero:CanUseSpell(HYDRASlot) == READY)
for i=1, heroManager.iCount do
local enemy = heroManager:GetHero(i)
if ValidTarget(enemy) then
local tempHealth = enemy.health - getDmg("AD", enemy, myHero)
if QREADY then
tempHealth = tempHealth - myHero:CalcDamage(enemy, (qDmgs[spellQ.level] + bonusDmg))
end
if RREADY and mumyc.useUlt["ult"..enemy.charName] then
tempHealth = tempHealth - getDmg("R", enemy, myHero)
end
if EREADY then
tempHealth = tempHealth - getDmg("E", enemy, myHero)
end
if QREADY then
tempHealth = tempHealth - myHero:CalcDamage(enemy, (qDmgs[spellQ.level] + bonusDmg + ((enemy.maxHealth - tempHealth) * 0.08)))
end
if tempHealth < 0 then
DrawText3D(tostring("Kill him"), enemy.x, enemy.y, enemy.z, 20, RGB(222, 245, 15), true)
end
end
end
end