forked from weepoko/scripts-1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimpleTalonRelease.lua
More file actions
912 lines (838 loc) · 34 KB
/
Copy pathSimpleTalonRelease.lua
File metadata and controls
912 lines (838 loc) · 34 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
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
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
local version = "2.07"
require "VPrediction"
if myHero.charName ~= "Talon" or not VIP_USER then return end
local AUTOUPDATE = true
local UPDATE_HOST = "raw.github.com"
local UPDATE_PATH = "/Jusbol/scripts/master/SimpleTalonRelease.lua.lua".."?rand="..math.random(1,10000)
local UPDATE_FILE_PATH = SCRIPT_PATH.."SimpleTalonRelease.lua.lua"
local UPDATE_URL = "https://"..UPDATE_HOST..UPDATE_PATH
function _AutoupdaterMsg(msg) print("<font color=\"#6699ff\"><b>Talon, Tail of the Dragon:</b></font> <font color=\"#FFFFFF\">"..msg..".</font>") end
if AUTOUPDATE then
local ServerData = GetWebResult(UPDATE_HOST, "/Jusbol/scripts/master/VersionFiles/Talon.version")
if ServerData then
ServerVersion = type(tonumber(ServerData)) == "number" and tonumber(ServerData) or nil
if ServerVersion then
if tonumber(version) < ServerVersion then
_AutoupdaterMsg("New version available"..ServerVersion)
_AutoupdaterMsg("Updating, please don't press F9")
DelayAction(function() DownloadFile(UPDATE_URL, UPDATE_FILE_PATH, function () _AutoupdaterMsg("Successfully updated. ("..version.." => "..ServerVersion.."), press F9 twice to load the updated version.") end) end, 3)
else
_AutoupdaterMsg("You have got the latest version ("..ServerVersion..")")
end
end
else
_AutoupdaterMsg("Error downloading version info")
end
end
--[[AUTO UPDATE END]]--
local TalonNoxianDiplomacy = {spellSlot = _Q, range = 250, width = 0, speed = math.huge, delay = 0.0435, ready = nil}
local TalonRake = {spellSlot = _W, range = 700, width = 0, speed = 902, delay = 0.4, ready = nil} --0.8 in/out
local TalonCutthroat = {spellSlot = _E, range = 700, width = 0, speed = math.huge, delay = 0.5, ready = nil}
local TalonShadowAssault = {spellSlot = _R, range = 650, width = 650, speed = 902, delay = 0.5, ready = nil}
--[[SPELLS]]--
local IgniteSpell = {spellSlot = "SummonerDot", slot = nil, range = 600, ready = false}
local BarreiraSpell = {spellSlot = "SummonerBarrier", slot = nil, range = 0, ready = false}
--[[ITEMS]]--
local Items = {
["Brtk"] = {ready = false, range = 450, SlotId = 3153, slot = nil},
["Bc"] = {ready = false, range = 450, SlotId = 3144, slot = nil},
["Rh"] = {ready = false, range = 400, SlotId = 3074, slot = nil},
["Tiamat"] = {ready = false, range = 400, SlotId = 3077, slot = nil},
["Hg"] = {ready = false, range = 700, SlotId = 3146, slot = nil},
["Yg"] = {ready = false, range = 150, SlotId = 3142, slot = nil},
["RO"] = {ready = false, range = 500, SlotId = 3143, slot = nil},
["SD"] = {ready = false, range = 150, SlotId = 3131, slot = nil},
["MU"] = {ready = false, range = 150, SlotId = 3042, slot = nil}
}
local HP_MANA = {
["Hppotion"] = {SlotId = 2003, ready = false, slot = nil},
["Manapotion"] = {SlotId = 2004 , ready = false, slot = nil}
}
local FoundItems = {}
--[[ORBWALK]]--
local myPlayer = GetMyHero()
local lastAttack, lastWindUpTime, lastAttackCD = 0, 0, 0
local myTrueRange = myPlayer.range + GetDistance(myPlayer.minBBox)
--[[others]]
local SequenciaHabilidades1 = {2,3,2,1,2, 4, 2,1,2,1, 4, 1,1,3,3, 4, 3,3}
local enemyRangeHitBox = 0
local Target = nil
local UsandoHP = false
local UsandoMana = false
local UsandoRecall = false
local DamageTable = {"P", "AD", "Q", "W", "E", "R", "IGNITE", "BWC", "TIAMAT", "HYDRA", "RUINEDKING"}
local DamageText = nil
local BuffNames = { "regenerationpotion", "flaskofcrystalwater", "recall" }
local RespawPoint = Vector(cameraPos.x, cameraPos.y, cameraPos.z):normalized()
function OnLoad()
Menu1()
UpdateVariaveis()
PrintChat("<font color=\"#6699ff\"><b>Talon, Tail of the Dragon by Jus</b></font>")
end
function Menu1()
Menu = scriptConfig(myPlayer.charName.." by Jus", "TalonMenu")
Menu:addParam("LigarScript", "Global ON/OFF", SCRIPT_PARAM_ONOFF, true)
Menu:addParam("Ver", "Talon Version", SCRIPT_PARAM_INFO, version)
--[[Combo]]
Menu:addSubMenu("Combo System", "Combo")
Menu.Combo:addParam("ComboSystem", "Use Combo System", SCRIPT_PARAM_ONOFF, true)
Menu.Combo:addParam("", "", SCRIPT_PARAM_INFO, "")
Menu.Combo:addParam("UseQ", "Use "..myPlayer:GetSpellData(_Q).name.." (Q)", SCRIPT_PARAM_ONOFF, true)
Menu.Combo:addParam("UseW", "Use "..myPlayer:GetSpellData(_W).name.." (W)", SCRIPT_PARAM_ONOFF, true)
Menu.Combo:addParam("UseE", "Use "..myPlayer:GetSpellData(_E).name.." (E)", SCRIPT_PARAM_ONOFF, true)
Menu.Combo:addParam("UseR", "Use "..myPlayer:GetSpellData(_R).name.." (R)", SCRIPT_PARAM_ONOFF, true)
Menu.Combo:addParam("", "", SCRIPT_PARAM_INFO, "")
Menu.Combo:addParam("ComboKey", "Team Fight Key", SCRIPT_PARAM_ONKEYDOWN, false, 32)
Menu.Combo:addSubMenu("Combo/Team Fight Settings", "CSettings")
Menu.Combo.CSettings:addParam("Mode", "Combo Mode", SCRIPT_PARAM_LIST, 2, {"E-Q-W-R", "W-E-Q-R", "E-W-R-Q"})
Menu.Combo.CSettings:addParam("Rdelay", "Ultimate delay to second cast", SCRIPT_PARAM_LIST, 4, {"0", "0.5", "1.0", "1.5", "2.0", "2.5"})
Menu.Combo.CSettings:addParam("scapeMode", "Scape Mode Prioritization", SCRIPT_PARAM_LIST, 1, {"Minion", "Enemy"}) -- "Auto"})
Menu.Combo.CSettings:addParam("scapeKey", "Scape with "..myPlayer:GetSpellData(_E).name.." (E)", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("V"))
Menu.Combo.CSettings:addParam("UseItems", "Auto Use Items", SCRIPT_PARAM_ONOFF, true)
Menu.Combo.CSettings:addParam("UseIgnite", "Auto Ignite Target", SCRIPT_PARAM_ONOFF, true)
Menu:addSubMenu("Harass System", "Harass")
Menu.Harass:addParam("HarassSystem", "Use Harass System", SCRIPT_PARAM_ONOFF, true)
Menu.Harass:addParam("", "", SCRIPT_PARAM_INFO, "")
Menu.Harass:addParam("HarassMode", "Harass Mode", SCRIPT_PARAM_LIST, 1, { "W", "E-Q-W", "E-Q" })
Menu.Harass:addParam("UseAutoW", "Auto Cast W", SCRIPT_PARAM_ONOFF, false)
Menu.Harass:addParam("StopCastMana", "Don't Harass if mana < %", SCRIPT_PARAM_SLICE, 40, 0, 100, -1)
Menu.Harass:addParam("UseW", "Use "..myPlayer:GetSpellData(_W).name.." (W)", SCRIPT_PARAM_ONOFF, true)
Menu.Harass:addParam("HarassKey", "Manual Harass Key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("C"))
--[[Farm]]
Menu:addSubMenu("Farm Helper System", "Farmerr")
Menu.Farmerr:addParam("FarmerrSystem", "Use Farm System", SCRIPT_PARAM_ONOFF, true)
Menu.Farmerr:addParam("", "", SCRIPT_PARAM_INFO, "")
Menu.Farmerr:addParam("UseAutoW", "Auto Cast W", SCRIPT_PARAM_ONOFF, false)
Menu.Farmerr:addParam("UseW", "Cast W if minion count >", SCRIPT_PARAM_LIST, 2, {"1", "2", "3", "4", "5", "OFF"})
Menu.Farmerr:addParam("StopCastMana", "Stop Cast W if mana below %", SCRIPT_PARAM_SLICE, 40, 20, 100, -1)
Menu.Farmerr:addParam("", "", SCRIPT_PARAM_INFO, "")
Menu.Farmerr:addParam("FarmKey", "Manual Farm Key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("X"))
--[[Items]]
Menu:addSubMenu("Items Helper System", "Items")
Menu.Items:addParam("ItemsSystem", "Use Items Helper System", SCRIPT_PARAM_ONOFF, true)
Menu.Items:addParam("", "", SCRIPT_PARAM_INFO, "")
Menu.Items:addParam("UseBarreira", "Auto Barrier", SCRIPT_PARAM_ONOFF, true)
Menu.Items:addParam("BarreiraPorcentagem", "Barrier Missing Health %", SCRIPT_PARAM_SLICE, 30, 10, 80, -1)
Menu.Items:addParam("AntiDoubleIgnite", "Anti Double Ignite", SCRIPT_PARAM_ONOFF, true)
Menu.Items:addParam("", "", SCRIPT_PARAM_INFO, "")
Menu.Items:addParam("AutoHP", "Auto HP Potion", SCRIPT_PARAM_ONOFF, true)
Menu.Items:addParam("AutoHPPorcentagem", "Use HP Potion if health %", SCRIPT_PARAM_SLICE, 60, 20, 80, -1)
Menu.Items:addParam("AutoMana", "Auto Mana Potion", SCRIPT_PARAM_ONOFF, true)
Menu.Items:addParam("AutoMANAPorcentagem", "Use Mana Potion if health %", SCRIPT_PARAM_SLICE, 60, 20, 80, -1)
--[[Draw]]
Menu:addSubMenu("Draw System", "Paint")
Menu.Paint:addParam("DrawSystem", "Use Draw System", SCRIPT_PARAM_ONOFF, true)
Menu.Paint:addParam("", "", SCRIPT_PARAM_INFO, "")
Menu.Paint:addParam("PaintW", "Draw "..myPlayer:GetSpellData(_W).name.." (W) Range", SCRIPT_PARAM_ONOFF, false)
Menu.Paint:addParam("PaintE", "Draw "..myPlayer:GetSpellData(_E).name.." (E) Range", SCRIPT_PARAM_ONOFF, true)
Menu.Paint:addParam("PaintR", "Draw "..myPlayer:GetSpellData(_R).name.." (R) Range", SCRIPT_PARAM_ONOFF, false)
Menu.Paint:addParam("", "", SCRIPT_PARAM_INFO, "")
Menu.Paint:addParam("PaintTarget", "Draw Target", SCRIPT_PARAM_ONOFF, true)
Menu.Paint:addParam("KillTarget", "Draw Text to Target", SCRIPT_PARAM_ONOFF, true)
Menu.Paint:addParam("", "", SCRIPT_PARAM_INFO, "")
--Menu.Paint:addParam("TurretHits", "Draw Turrent AA/Q hits", SCRIPT_PARAM_ONOFF, true)
--Menu.Paint:addParam("HotSpot", "Draw Hotspots", SCRIPT_PARAM_ONOFF, false)
--[[Others]]
Menu:addSubMenu("General System", "General")
Menu.General:addParam("", "", SCRIPT_PARAM_INFO, "")
Menu.General:addParam("LevelSkill", "Auto Level Skills R-W-Q-E", SCRIPT_PARAM_ONOFF, true)
Menu.General:addParam("UseOrb", "Use Orbwalking", SCRIPT_PARAM_ONOFF, true)
Menu.General:addParam("grab", "Stay in the target", SCRIPT_PARAM_ONOFF, false)
Menu.General:addParam("", "", SCRIPT_PARAM_INFO, "")
Menu.General:addParam("UsePacket", "Use Packet to Cast", SCRIPT_PARAM_ONOFF, true)
Menu.General:addParam("UseVPred", "Use VPredicion to Cast", SCRIPT_PARAM_ONOFF, true)
--Menu.General:addParam("AutoUpdate", "Auto Update Script On Start", SCRIPT_PARAM_ONOFF, true)
--[[PermaShow Options]]
Menu:permaShow("Ver")
Menu.Combo:permaShow("ComboKey")
Menu.Harass:permaShow("HarassKey")
Menu.Farmerr:permaShow("FarmKey")
Menu.Combo.CSettings:permaShow("scapeKey")
--[[spells]]
if myPlayer:GetSpellData(SUMMONER_1).name:find(IgniteSpell.spellSlot) then IgniteSpell.slot = SUMMONER_1
elseif myPlayer:GetSpellData(SUMMONER_2).name:find(IgniteSpell.spellSlot) then IgniteSpell.slot = SUMMONER_2 end
if myPlayer:GetSpellData(SUMMONER_1).name:find(BarreiraSpell.spellSlot) then BarreiraSpell.slot = SUMMONER_1
elseif myPlayer:GetSpellData(SUMMONER_2).name:find(BarreiraSpell.spellSlot) then BarreiraSpell.slot = SUMMONER_2 end
--[[others_func]]
--[[
enemyHeroes = GetEnemyHeroes()
if heroManager.iCount < 10 then -- borrowed from Sidas Auto Carry, modified to 3v3
PrintChat(" >> Too few champions to arrange priority")
elseif heroManager.iCount == 6 and TTMAP then
ArrangeTTPriorities()
else
ArrangePriorities()
end
]]
--[[Ts/minion/jungle]]
Alvo = TargetSelector(TARGET_LESS_CAST_PRIORITY, 1200, DAMAGE_PHYSICAL, true)
Alvo.name = "Talon"
Menu:addTS(Alvo)
MinionsInimigos = minionManager(MINION_ENEMY, TalonRake.range, myPlayer, MINION_SORT_HEALTH_ASC)
VP = VPrediction()
end
function ValidSpell(spellslot_) --_Q, _W...
local Ready = myPlayer:CanUseSpell(spellslot_) == READY
return spellslot_ ~= nil and Ready
end
function UpdateVariaveis()
--[[TARGET SELECTOR]]--
Target = GetCustomTarget()
if ValidTarget(Target) then enemyRangeHitBox = VP:GetHitBox(Target) else enemyRangeHitBox = 0 end
--[[MINION MANAGER]]--
MinionsInimigos:update()
end
function getHitBoxRadius(hero_)
return GetDistance(hero_.minBBox, hero_.maxBBox)/2
end
function ThisIsReal(myTarget) -- < myPlayer.range
local range = GetDistance(myTarget) - getHitBoxRadius(myTarget) - getHitBoxRadius(myPlayer)
return range
end
--[[cast SKILLs]]
function CastQ(myTarget)
local tick = os.clock()
local UseQ_ = Menu.Combo.UseQ
local sReady = ValidSpell(_Q)
if not UseQ_ then return end
if ValidTarget(myTarget, TalonNoxianDiplomacy.range) and sReady and tick - os.clock() < 1 then
if Menu.General.UsePacket then
tick = os.clock()
Packet('S_CAST', { spellId = TalonNoxianDiplomacy.spellSlot}):send()
else
tick = os.clock()
CastSpell(TalonNoxianDiplomacy.spellSlot)
end
end
end
function CastW(myTarget)
local tick = os.clock()
local UseW_ = Menu.Combo.UseW
local sReady = ValidSpell(_W)
if not UseW_ then return end
if ValidTarget(myTarget, TalonRake.range) and sReady and tick - os.clock() < 1 then
if Menu.General.UseVPred then
local mainCastPosition, mainHitChance = VP:GetConeAOECastPosition(myTarget,
((TalonRake.delay + 350)/TalonRake.speed),
52,
TalonRake.range,
TalonRake.speed,
myPlayer)
if mainHitChance >= 2 then
tick = os.clock()
Packet('S_CAST', { spellId = TalonRake.spellSlot, toX = mainCastPosition.x, toY = mainCastPosition.z }):send()
end
else
tick = os.clock()
CastSpell(TalonRake.spellSlot, myTarget.x, myTarget.z)
end
end
end
function CastE(myTarget)
local tick = os.clock()
local UseE_ = Menu.Combo.UseE
local sReady = ValidSpell(_E)
if not UseE_ then return end
if ValidTarget(myTarget, TalonCutthroat.range) and sReady and tick - os.clock() < 1 then
if Menu.General.UsePacket then
tick = os.clock()
Packet('S_CAST', { spellId = TalonCutthroat.spellSlot, targetNetworkId = myTarget.networkID }):send()
lastAttack = 0
else
tick = os.clock()
CastSpell(TalonCutthroat.spellSlot, myTarget)
lastAttack = 0
end
end
end
function CastR(myTarget)
local tick = os.clock()
local UseR_ = Menu.Combo.UseR
local rDelay = Menu.Combo.CSettings.Rdelay
local sReady = ValidSpell(_R)
if not UseR_ then return end
if ValidTarget(myTarget, TalonShadowAssault.range) and sReady and tick - os.clock() < 1 then
if Menu.General.UseVPred then
local AOECastPosition, MainTargetHitChance, nTargets = VP:GetCircularAOECastPosition(myTarget,
TalonShadowAssault.delay,
TalonShadowAssault.width,
TalonShadowAssault.range,
TalonShadowAssault.speed,
myPlayer)
if MainTargetHitChance >= 2 then
tick = os.clock()
CastSpell(TalonShadowAssault.spellSlot, AOECastPosition.x, AOECastPosition.z)
DelayAction(function ()
CastSpell(TalonShadowAssault.spellSlot, AOECastPosition.x, AOECastPosition.z)
end,
rDelay + GetLatency() / 2)
end
else
tick = os.clock()
CastSpell(TalonShadowAssault.spellSlot, myTarget.x, myTarget.z)
DelayAction(function ()
CastSpell(TalonShadowAssault.spellSlot, myTarget.x, myTarget.z)
end,
rDelay + GetLatency() / 2)
end
end
end
function NewCastR(myTarget)
local UseR_ = Menu.Combo.UseR
local rDelay = Menu.Combo.CSettings.Rdelay
local sReady = ValidSpell(_R)
if not UseR_ then return end
if ValidTarget(myTarget, TalonShadowAssault.range) and sReady then
local MyPos = Vector(myPlayer):normalized()
local EnemyPosition = Vector(myTarget - MyPos):normalized()
if EnemyPosition < MyPos then
CastSpell(TalonShadowAssault.spellSlot, myTarget.x, myTarget.z)
DelayAction(function ()
CastSpell(TalonShadowAssault.spellSlot, myTarget.x, myTarget.z)
end,
rDelay + GetLatency() / 2)
end
end
end
--[[end]]
--[[cast Spells/items]]
function CheckItems(tabela)
for ItemIndex, Value in pairs(tabela) do
Value.slot = GetInventorySlotItem(Value.SlotId)
if Value.slot ~= nil and (myPlayer:CanUseSpell(Value.slot) == READY) then
FoundItems[#FoundItems+1] = ItemIndex
end
end
end
function CastCommonItem()
CheckItems(Items)
if #FoundItems ~= 0 then
for i, Items_ in pairs(FoundItems) do
if Target ~= nil then
if GetDistance(Target) <= Items[Items_].range then
if Items_ == "Brtk" or Items_ == "Bc" then
CastSpell(Items[Items_].slot, Target)
else
CastSpell(Items[Items_].slot)
end
end
end
FoundItems[i] = nil --clear table to optimaze
end
end
end
function CastSurviveItem()
CheckItems(HP_MANA)
local AutoHPPorcentagem_ = Menu.Items.AutoHPPorcentagem
local AutoMANAPorcentagem_ = Menu.Items.AutoMANAPorcentagem
local HP_Porcentagem = (myPlayer.health / myPlayer.maxHealth *100)
local MANA_Porcentagem = (myPlayer.mana / myPlayer.maxMana *100)
local UseBarreira_ = Menu.Items.UseBarreira
local UseBarreiraPorcen_ = Menu.Items.BarreiraPorcentagem
local UseBarreiraPorcen_1 = (myPlayer.health / myPlayer.maxHealth *100)
if #FoundItems ~= 0 then
for i, HP_MANA_ in pairs(FoundItems) do
if HP_MANA_ == "Hppotion" and HP_Porcentagem <= AutoHPPorcentagem_ and not InFountain() and not UsandoHP then
CastSpell(HP_MANA[HP_MANA_].slot)
end
if HP_MANA_ == "Manapotion" and MANA_Porcentagem <= AutoMANAPorcentagem_ and not InFountain() and not UsandoMana then
CastSpell(HP_MANA[HP_MANA_].slot)
end
FoundItems[i] = nil
end
if BarreiraSpell.slot ~= nil and UseBarreira_ and UseBarreiraPorcen_1 <= UseBarreiraPorcen_ and not InFountain() then
CastSpell(BarreiraSpell.slot)
end
end
end
--[[BUFFS CONTROL]]--
function OnGainBuff(unit, buff)
if unit.isMe then
for i=1, #BuffNames do
if buff.name:lower():find(BuffNames[i]) then
if BuffNames[i] == "regenerationpotion" then UsandoHP = true end
if BuffNames[i] == "flaskofcrystalwater" then UsandoMana = true end
if BuffNames[i] == "recall" then UsandoRecall = true end
end
end
end
end
function OnLoseBuff(unit, buff)
if unit.isMe then
for i=1, #BuffNames do
if buff.name:lower():find(BuffNames[i]) then
if BuffNames[i] == "regenerationpotion" then UsandoHP = false end
if BuffNames[i] == "flaskofcrystalwater" then UsandoMana = false end
if BuffNames[i] == "recall" then UsandoRecall = false end
end
end
end
end
function OnTick()
--[[Script]]
local OnOff = Menu.LigarScript
--[[Combo]]
local Usar = Menu.Combo.ComboKey
local UsarItems_ = Menu.Combo.CSettings.UseItems
local UsarScape_ = Menu.Combo.CSettings.scapeKey
local ComboMode = Menu.Combo.CSettings.Mode
--[[Harass]]
local UsarHarass = Menu.Harass.HarassSystem
local UsarHarassKey = Menu.Harass.HarassKey
local UsarAutoHarass = Menu.Harass.UseAutoW
local StopCastManaP = Menu.Harass.StopCastMana
local MyMana_ = (myPlayer.mana / myPlayer.maxMana *100)
--[[Farm]]
local FarmerrSystem_ = Menu.Farmerr.FarmerrSystem
local FarmUseW_ = Menu.Farmerr.UseW
local UsarAutoFarm = Menu.Farmerr.UseAutoW
local UsarFarmKey = Menu.Farmerr.FarmKey
--[[Others]]
local AutoHP_ = Menu.Items.AutoHP
local AutoMana_ = Menu.Items.AutoMana
local AutoLevelSkills_ = Menu.General.LevelSkill
local UseOrb_ = Menu.General.UseOrb
local UseIgnite_ = Menu.Combo.CSettings.UseIgnite
if not OnOff or myPlayer.dead then return end
UpdateVariaveis()
if Usar then
if _G.MMA_Loaded then
_G.MMA_AbleToMove = false
end
if _G.AutoCarry then
_G.AutoCarry.CanMove = false
end
if UseOrb_ then _OrbWalk(Target) end
if UseIgnite_ then CastIgnite(Target) end
if ComboMode == 1 then --"E-Q-W-R"
CastE(Target)
if not TalonCutthroat.ready then CastQ(Target) end
if not TalonNoxianDiplomacy.ready then CastW(Target) end
if not TalonRake.ready then CastR(Target) end
end
if ComboMode == 2 then --"W-E-Q-R"
CastW(Target)
if not TalonRake.ready then CastE(Target) end
if not TalonCutthroat.ready then CastQ(Target) end
if not TalonNoxianDiplomacy.ready then CastR(Target) end
end
if ComboMode == 3 then --"E-W-R-Q"
CastE(Target)
if not TalonCutthroat.ready then CastW(Target) end
if not TalonRake.ready then CastR(Target) end
if not TalonShadowAssault.ready then CastQ(Target) end
end
end
if UsarScape_ then
if UseOrb_ then _OrbWalk() end
ScapeRules()
end
if UsarHarass then
if UsarAutoHarass and MyMana_ >= StopCastManaP then
CastW(Target)
end
if UsarHarassKey and MyMana_ >= StopCastManaP then
SmartHarass(Target)
if UseOrb_ then _OrbWalk(Target) end
end
end
if FarmerrSystem_ then
if UsarAutoFarm and FarmUseW_ and not UsandoRecall then
FarmMinionsW()
else
if UsarFarmKey then
FarmMinionsW()
if UseOrb_ then _OrbWalk() end
end
end
end
if AutoLevelSkills_ then AutoSkillLevel() end
if AutoHP_ or AutoMana_ then CastSurviveItem() end
end
function OnDraw()
local wDraw = Menu.Paint.PaintW
local eDraw = Menu.Paint.PaintE
local rDraw = Menu.Paint.PaintR
local tDraw = Menu.Paint.PaintTarget
local tdDraw = Menu.Paint.KillTarget
local DrawSystem_ = Menu.Paint.DrawSystem
--local DrawTurret = Menu.Paint.TurretHits
if not Menu.LigarScript or myPlayer.dead or not DrawSystem_ then return end
if wDraw then
DrawCircle2(myPlayer.x, myPlayer.y, myPlayer.z, TalonRake.range, ARGB(255, 255, 000, 000))
end
if eDraw then
DrawCircle2(myPlayer.x, myPlayer.y, myPlayer.z, TalonCutthroat.range, ARGB(255,0,255,0))
end
if rDraw then
DrawCircle2(myPlayer.x, myPlayer.y, myPlayer.z, TalonShadowAssault.range, ARGB(255, 255, 255, 000))
end
if tDraw and ValidTarget(Target) then
for i=0, 3, 1 do
DrawCircle2(Target.x, Target.y, Target.z, 80 + i , ARGB(255, 255, 000, 255))
end
end
if tdDraw then
local DamageText_ = KillTextDamage()
if ValidTarget(Target) and GetDistance(Target) <= 1200 then
DrawText3D(tostring(DamageText_),Target.x ,Target.y + 50, Target.z, 22, ARGB(255,255,0,0), true)
end
end
end
function OnProcessSpell(object, spell)
if object == myPlayer then
if spell.name:lower():find("attack") then
lastAttack = GetTickCount() - GetLatency() / 2
lastWindUpTime = spell.windUpTime * 1000
lastAttackCD = spell.animationTime * 1000
if ValidTarget(Target) then CastQ(Target) end
end
if spell.name == "TalonNoxianDiplomacy" then
local UsarItems_ = Menu.Combo.CSettings.UseItems
if UsarItems_ then CastCommonItem() end
end
end
end
--[[others functions]]
local HotSpots = {
{x = 4747.55, y = -46.02, z = 8337.48},
{x = 1902.06, y = 53.81, z = 9550.72},
{x = 2851.71, y = 55.04, z = 7629.16},
{x = 3540.07, y = 55.60, z = 6426.89},
{x = 6005.74, y = 51.67, z = 4913.65},
{x = 6972.89, y = 51.67, z = 4993.82},
{x = 8243.45, y = 55.41, z = 4232.10},
{x = 9589.52, y = 50.90, z = 6372.92},
{x = 8828.17, y = 61.94, z = 1932.64}
}
function Arredondar(num, idp)
return string.format("%." .. (idp or 0) .. "f", num)
end
function TurretHits()
local turrets = GetTurrets()
local targetTurret = nil
local aahits = 0
local qhits = 0
for i, turret in pairs(turrets) do
if turret ~= nil and turret.team ~= myHero.team then
targetTurret = turret.object
aahits = Arredondar(turret.object.health / getDmg("AD", targetTurret, myPlayer))
qhits = Arredondar(turret.object.health / getDmg("Q", targetTurret, myPlayer))
if aahits ~= 0 or qhits ~= 0 then
turrethits_ = "AA: " .. aahits .. "/Q: " .. qhits
end
end
end
return turrethits_
end
function SmartHarass(myTarget) --"W", "W-E-Q", "E-Q"
--[[Harass Menu]]
local HarassMode_ = Menu.Harass.HarassMode
if HarassMode_ == 1 then
CastW(myTarget)
end
if HarassMode_ == 2 then
CastW(myTarget)
if not TalonRake.ready then CastE(myTarget) end
if not TalonCutthroat.ready then CastQ(myTarget) end
end
if HarassMode_ == 3 then
CastE(myTarget)
if not TalonCutthroat.ready then CastQ(myTarget) end
end
end
function ScapeRules()
if InFountain() then return end
local Enemys = GetEnemyHeroes() --targetmaneger
local MyPos = Vector(myPlayer.x, myPlayer.y, myPlayer.z):normalized() --vector of myPlayer
local EnemyPosT_ = {} --table with vector of all nearby enemies
local MinionPosT_ = {} --table with vector of all nearby minions
local scapeMode_ = Menu.Combo.CSettings.scapeMode --{"Minion", "Enemy", "Auto"}]
local ScapeTarget = nil --final target to cast E
if IsWallOfGrass(D3DXVECTOR3(MyPos.x, MyPos.y, MyPos.z)) then
for i, Minions_ in pairs(MinionsInimigos.objects) do
local MinionPos_ = Vector(Minion_.x, Minion_.y, Minion_.z):normalized()
if MinionPos_ > MyPos then
CastSpell(TalonCutthroat.spellSlot, Minions_)
end
end
end
--[[Cast E if "Enemy" Option]]
if scapeMode_ == 2 then --Mode 2 = enemy
--1.Buffer enemy vector pos in a table
for i, Enemy_ in pairs(Enemys) do
if ValidTarget(Enemy_, TalonCutthroat.range) then
local EnemyPos = Vector(Enemy_.x, Enemy_.y, Enemy_.z):normalized()
EnemyPosT_[#EnemyPosT_+1] = EnemyPos
end
end
--1.1. Check for distance and cast E
for i, Enemy_ in pairs(EnemyPosT_) do
for i, myTarget_ in pairs(Enemys) do
local EnemyDist = GetDistance(Enemy_, RespawPoint) --distance between EnemyPos and Respaw
local MyDist = GetDistance(MyPos, RespawPoint) --distance between Me and Respaw
local RealTarget= GetDistance(myTarget_, RespawPoint) --distance between Actual target and Respaw
if EnemyDist < MyDist or RealTarget < MyDist and TalonCutthroat.ready then --there is no reason to use "E" if I'm closer to the base than the enemy
CastSpell(TalonCutthroat.spellSlot, myTarget_)
end
end
EnemyPosT_[i] = nil
end
end
--[[Cast E if "Minion" Option]]
if scapeMode_ == 1 then
--2. Buff minions vector pos in a table]]
for i, Minion_ in pairs(MinionsInimigos.objects) do
if ValidTarget(Minion_, TalonCutthroat.range) then
local MinionPos = Vector(Minion_.x, Minion_.y, Minion_.z):normalized()
MinionPosT_[#MinionPosT_+1] = MinionPos
end
end
--2.1. Check for distance and cast E
for i, Minion_ in pairs(MinionPosT_) do
for i, myMinionTarget_ in pairs(MinionsInimigos.objects) do
local MinionDist = GetDistance(Minion_, RespawPoint) --distance between Minion and Respaw
local MyDist = GetDistance(MyPos, RespawPoint)
local RealMinion = GetDistance(myMinionTarget_, RespawPoint)
if MinionDist < MyDist or RealMinion < MyDist and CountEnemyHeroInRange(400, Minion_) < 2 and TalonCutthroat.ready then --there is no reason to use "E" if I'm closer to the base than the minion
CastSpell(TalonCutthroat.spellSlot, myMinionTarget_)
end
end
MinionPosT_[i] = nil
end
end
end
function CastIgnite(myTarget)
--local IgniteReady = (myHero:CanUseSpell(IgniteSpell.slot) == READY)
local AntiDoubleIgnite_ = Menu.Items.AntiDoubleIgnite
if IgniteSpell.slot ~= nil and ValidTarget(myTarget, IgniteSpell.range) then
if AntiDoubleIgnite_ and TargetHaveBuff("SummonerDot", myTarget) then return end
if AntiDoubleIgnite_ and not TargetHaveBuff("SummonerDot", myTarget) then
if Menu.General.UsePacket then
Packet('S_CAST', { spellId = IgniteSpell.slot, targetNetworkId = myTarget.networkID }):send()
else
CastSpell(IgniteSpell.iSlot, myTarget)
end
else
if Menu.General.UsePacket then
Packet('S_CAST', { spellId = IgniteSpell.slot, targetNetworkId = myTarget.networkID }):send()
else
CastSpell(IgniteSpell.slot, myTarget)
end
end
end
end
function KillTextDamage()
if ValidTarget(Target) then
local Damage_ = 0
local TotalDamage = 0
for i = 1, #DamageTable do
if DamageTable[i] == "Q" and ValidSpell(_Q) then
Damage_ = (getDmg(DamageTable[i], Target, myPlayer) or 0)
TotalDamage = TotalDamage + Damage_
end
if DamageTable[i] == "W" and ValidSpell(_W) then
Damage_ = (getDmg(DamageTable[i], Target, myPlayer) or 0)
TotalDamage = TotalDamage + Damage_
end
if DamageTable[i] == "E" and ValidSpell(_E) then
Damage_ = (getDmg(DamageTable[i], Target, myPlayer) or 0)
TotalDamage = TotalDamage + Damage_
end
if DamageTable[i] == "R" and ValidSpell(_R) then
Damage_ = (getDmg(DamageTable[i], Target, myPlayer) or 0)
TotalDamage = TotalDamage + Damage_
end
Damage_ = (getDmg(DamageTable[i], Target, myPlayer) or 0)
TotalDamage = TotalDamage + Damage_
end
if Target.health > TotalDamage then
DamageText = "Need Harass"
end
if Target.health < TotalDamage then
DamageText = "Fatality!"
end
end
return DamageText
end
function AutoSkillLevel()
if myPlayer:GetSpellData(_Q).level + myPlayer:GetSpellData(_W).level + myPlayer:GetSpellData(_E).level + myPlayer:GetSpellData(_R).level < myPlayer.level then
local spellSlot = { SPELL_1, SPELL_2, SPELL_3, SPELL_4, }
local level = { 0, 0, 0, 0 }
for i = 1, myPlayer.level, 1 do
level[SequenciaHabilidades1[i]] = level[SequenciaHabilidades1[i]] + 1
end
for i, v in ipairs({ myPlayer:GetSpellData(_Q).level, myPlayer:GetSpellData(_W).level, myPlayer:GetSpellData(_E).level, myPlayer:GetSpellData(_R).level }) do
if v < level[i] then LevelSpell(spellSlot[i]) end
end
end
end
--trees
function GetCustomTarget()
Alvo:update()
if _G.MMA_Target and _G.MMA_Target.type == myPlayer.type then return _G.MMA_Target end
if _G.AutoCarry and _G.AutoCarry.Crosshair and _G.AutoCarry.Attack_Crosshair and _G.AutoCarry.Attack_Crosshair.target and _G.AutoCarry.Attack_Crosshair.target.type == myPlayer.type then return _G.AutoCarry.Attack_Crosshair.target end
return Alvo.target
end
function _OrbWalk(myTarget)
if ValidTarget(myTarget) and ThisIsReal(myTarget) <= myPlayer.range then
if timeToShoot() then
myPlayer:Attack(myTarget)
elseif heroCanMove() then
moveToCursor()
end
else
moveToCursor()
end
end
function heroCanMove()
return ( GetTickCount() + GetLatency() / 2 > lastAttack + lastWindUpTime + 20 )
end
function timeToShoot()
return ( GetTickCount() + GetLatency() / 2 > lastAttack + lastAttackCD )
end
function moveToCursor()
local grab = Menu.General.grab
local range = myPlayer.range
if grab then range = 550 else range = myPlayer.range end
if GetDistance(mousePos) > range then
local moveToPos = myPlayer + (Vector(mousePos) - myPlayer):normalized() * 550
myPlayer:MoveTo(moveToPos.x, moveToPos.z)
end
end
--[[Credits to barasia, vadash and viseversa for anti-lag circles]]--
function DrawCircleNextLvl(x, y, z, radius, width, color, chordlength)
radius = radius or 300
quality = math.max(8,math.floor(180/math.deg((math.asin((chordlength/(2*radius)))))))
quality = 2 * math.pi / quality
radius = radius*.92
local points = {}
for theta = 0, 2 * math.pi + quality, quality do
local c = WorldToScreen(D3DXVECTOR3(x + radius * math.cos(theta), y, z - radius * math.sin(theta)))
points[#points + 1] = D3DXVECTOR2(c.x, c.y)
end
DrawLines2(points, width or 1, color or 4294967295)
end
function DrawCircle2(x, y, z, radius, color)
local vPos1 = Vector(x, y, z)
local vPos2 = Vector(cameraPos.x, cameraPos.y, cameraPos.z)
local tPos = vPos1 - (vPos1 - vPos2):normalized() * radius
local sPos = WorldToScreen(D3DXVECTOR3(tPos.x, tPos.y, tPos.z))
if OnScreen({ x = sPos.x, y = sPos.y }, { x = sPos.x, y = sPos.y }) then
DrawCircleNextLvl(x, y, z, radius, 1, color, 75)
end
end
--[[END]]--
--[[SIDA Revamped]]--
priorityTable = {
AP = {
"Annie", "Ahri", "Akali", "Anivia", "Annie", "Brand", "Cassiopeia", "Diana", "Evelynn", "FiddleSticks", "Fizz", "Gragas", "Heimerdinger", "Karthus",
"Kassadin", "Katarina", "Kayle", "Kennen", "Leblanc", "Lissandra", "Lux", "Malzahar", "Mordekaiser", "Morgana", "Nidalee", "Orianna",
"Ryze", "Sion", "Swain", "Syndra", "Teemo", "TwistedFate", "Veigar", "Vel'koz", "Viktor", "Vladimir", "Xerath", "Ziggs", "Zyra",
},
Support = {
"Alistar", "Blitzcrank", "Janna", "Karma", "Leona", "Lulu", "Nami", "Nunu", "Sona", "Soraka", "Taric", "Thresh", "Zilean",
},
Tank = {
"Amumu", "Chogath", "DrMundo", "Galio", "Hecarim", "Malphite", "Maokai", "Nasus", "Rammus", "Sejuani", "Nautilus", "Shen", "Singed", "Skarner", "Volibear",
"Warwick", "Yorick", "Zac",
},
AD_Carry = {
"Ashe", "Caitlyn", "Corki", "Draven", "Ezreal", "Graves", "Jayce", "Jinx", "KogMaw", "Lucian", "MasterYi", "MissFortune", "Pantheon", "Quinn", "Shaco", "Sivir",
"Talon","Tryndamere", "Tristana", "Twitch", "Urgot", "Varus", "Vayne", "Yasuo","Zed",
},
Bruiser = {
"Aatrox", "Darius", "Elise", "Fiora", "Gangplank", "Garen", "Irelia", "JarvanIV", "Jax", "Khazix", "LeeSin", "Nocturne", "Olaf", "Poppy",
"Renekton", "Rengar", "Riven", "Rumble", "Shyvana", "Trundle", "Udyr", "Vi", "MonkeyKing", "XinZhao",
},
}
--- Arrange Priorities 5v5 ---
--->
function ArrangePriorities()
for i, enemy in pairs(enemyHeroes) do
SetPriority(priorityTable.AD_Carry, enemy, 1)
SetPriority(priorityTable.AP, enemy, 2)
SetPriority(priorityTable.Support, enemy, 3)
SetPriority(priorityTable.Bruiser, enemy, 4)
SetPriority(priorityTable.Tank, enemy, 5)
end
end
---<
--- Arrange Priorities 5v5 ---
--- Arrange Priorities 3v3 ---
--->
function ArrangeTTPriorities()
for i, enemy in pairs(enemyHeroes) do
SetPriority(priorityTable.AD_Carry, enemy, 1)
SetPriority(priorityTable.AP, enemy, 1)
SetPriority(priorityTable.Support, enemy, 2)
SetPriority(priorityTable.Bruiser, enemy, 2)
SetPriority(priorityTable.Tank, enemy, 3)
end
end
---<
--- Arrange Priorities 3v3 ---
--- Set Priorities ---
--->
function SetPriority(table, hero, priority)
for i = 1, #table, 1 do
if hero.charName:find(table[i]) ~= nil then
TS_SetHeroPriority(priority, hero.charName)
end
end
end
--[[honda]]
function CountObjectsNearPos(pos, radius, objects)
local n = 0
for i, object in ipairs(objects) do
if GetDistanceSqr(pos, object) <= radius * radius then
n = n + 1
end
end
return n
end
function GetBestCircularFarmPosition(range, radius, objects)
local BestPos
local BestHit = 0
for i, object in ipairs(objects) do
local hit = CountObjectsNearPos(object.visionPos or object, radius, objects)
if hit > BestHit then
BestHit = hit
BestPos = Vector(object)
if BestHit == #objects then
break
end
end
end
return BestPos, BestHit
end
--
function FarmMinionsW()
local FarmWithW = Menu.Farmerr.UseW
local manaStop = Menu.Farmerr.StopCastMana
local actualMana = (myPlayer.mana / myPlayer.maxMana *100)
if FarmWithW == 6 then return end
MinionsInimigos:update()
for i, Minion in pairs(MinionsInimigos.objects) do
local BestPos, BestHit = GetBestCircularFarmPosition(TalonRake.range, 400, MinionsInimigos.objects)
if BestHit > FarmWithW then --check if number of minion is higher than X
CastSpell(TalonRake.spellSlot, BestPos.x, BestPos.z)
end
end
end
--[[getting pos
function GetPos()
Posx = mousePos.x
Posy = mousePos.y
Posz = mousePos.z
Print1 = tostring(Posx)
Print2 = tostring(Posy)
Print3 = tostring(Posz)
end
function OnWndMsg(msg,key)
if msg == KEY_DOWN and key == string.byte("N") then
GetPos()
PrintChat(table.concat({Print1,Print2,Print3},','))
end
end
]]