forked from Pussykate/GoS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DrMundoTocsin.lua
531 lines (469 loc) · 25.8 KB
/
DrMundoTocsin.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
--
--
--
-- ,c ,;r .r
-- ;;;r:;,i; cr ;,
-- ., r; ; i,rr..;c.
-- :r,,::;. : T;
-- ; .;;.
-- .,:::.. i; ,;. .,
-- ,;:;::,,.:::.. .:,. .::;i ,; ::. .7;;c;:::;;.
-- ,;; ;;,., :r;: :L sZ;;;sjrr ;. :;: ; .,::;; ,;,,
-- ,.,,;;;: ;;. .::. ,C7 :,5 ;c, ,:; : ;: ,rr;;..,;;,
-- .;r;...;; ;; .:;,, .i L . . gc ; :. c: ,;;;,,..
-- .c; . ;.,:. .,:,:;. :r ;: , c.rr ; ; ;; ...,,;;,
-- :T; :;;:,, :;. :;,. .,:; ,; .rn@@Z@csB@; ; :..,,,. r, .,;:
-- .;,: ,: : . r;,:: ;SdDB@BH0@BO ., ;, ;. .,;, r.:;:, ;.;
-- .; : .; ; ,,.:: . ;#@@; ,;. i. ;. ;; :, .:;;. ;:;
-- .; ; r .;, ;; .:: :. .@B@;.. ,, ;7 ; ,. :,;
-- ; ; .r, ,; ;;..i, ;. sB@#@7 ,:, :,:.;: ; , ,,T.
-- ,: . ,;r::, ,, :;;, ; ;;6r Zs :r;... ;;,.:; .;: r ; rr
-- ;, ;;: ,:. .,;:; ..,,,. :; ,r;;. .;r:. ;,::. :: r ; .i.
-- ; ,r. .i:;;;;;,. ;c;;.. ;,:,;:. ; ;:.7. .,;; . .r r, .r:
-- ;. , ; .r, ..,, . ; .:; ;.,,:.:s: ,;;. ,;,; i, .r,
-- ;. . .,;. ;.; ; ,::. ; r. ::. .;;; .r .; ,;
-- ;. ;. ,;,, .; ,: .; :.,, ; ;, ,;:rr. :, .: ;
-- r ; ;, .; ,, ; ,, ,, ,. .r; 7. ;, ;;
-- .; ;,i ::. :,. ;;, .;: .;:.:. .r .;;: rr; , ;r
-- ;. ,:r. :;:r ;,.:;;,.,,:,..;.;,. r: ... ;.:. ;s: :r
-- ;; r ;. .; . . ;r,, .. .. ;;;. x. .;;,
-- ;: ; ;r:...,7,,:;;;,.;r;;... .. ..,:;r;.rr. r ; ;;
-- r ,, ;. ;T; .r ,. ,,. .c:..:,,.,.;;;::,.,;r, ,r .; ; ,;.
-- ;. .r;,. r r ,;,:: i,; ;.,. . :,;:. r; ;; r . ;.r
-- ,; ::;t;.;: ;. :;. , : . r;. ..,.,,:.;. ;, .r ; : i:
-- .r ,;, :;,,. ;;. r ; ,T .r .. r. ;, ;7. ,: ;;.
-- .::::;. : ;. r .;.:... ; :: ;;; ; ;; ;,.r;. :: :;:
-- :;:.,;, r :, ;rr: ,;. :, r ,; ;;; r r ;i . .: ; ;
-- ,. ;. ; .;;:;.c ; ,: :; .. ;t. ;, :; . .; r;.:
-- ; ; ;;:.:. ; ,: ;, ;;,,;,,.. i. ...,;:. r:.;,
-- ; ;. .;;,.;;:,. :; ; :, .r. , ::;. .,:.
-- r ,, ,, .;;r,,r, ; ; ;:r. :s
-- ;: ;.;;,. .,r; ; ;. . :,7
-- :; ,r;:;::. ;r. r:; ;; ,;;;:;;, :;:.
-- ; .. .::. .;: .;; ; ,;: .;; ,; .rr,.
-- ,;; :,.,. .,;:i, .: :;. .;. ;: r: ,:;:.
-- ,sr. : ,:;,:.. r :; ,:,,. ;. . ;:
-- ; ;; ., ; :;; r ;:.;,... r;.r
-- ;,, .;;Ljr;, ;;. ; . r;;
-- r;.; .. ;;,;, ; ; ,: ;;:, ;
-- . ;; .: . :. t ;;.; ;; ;;.;;, .; .:,;
-- :; ;; ::;.,::;..;. ;: ; ;.; :; ,; :: ;.
-- ,r:. . .;r,,. r .; r, .r, ,.:. ;r;
-- i, ,;;, ;, ,;.;.; .;;:;: ..r
-- ::, ,: .j. ;; r,
-- .;..; : ;, .; r
-- .r .; r, :. ,: ;: :: r .;:
-- .i;:. r. :: .; ;. ; .; ;;
-- ;;cr;;, , . .r :: ;: . ;,
-- ;:jr:s;.::,, ::; :; : .. .;. r;
-- .r;r :; ;; ; ,:.; i ,.;rrr;
-- ::..:; ;. r... r ;r.;r,
-- i ;;r :; 5..,c;.ic:
-- ,;.. :. ,;ir;,,.
-- ,,,.
--
--
--
local ScriptVersion = "PussyVers. 0.02"
local Q = { Range = 920, Delay = 0.5, Speed = 2000, Width = 60}
require "DamageLib"
if not FileExist(COMMON_PATH .. "PremiumPrediction.lua") then
DownloadFileAsync("https://raw.githubusercontent.com/Ark223/GoS-Scripts/master/PremiumPrediction.lua", COMMON_PATH .. "PremiumPrediction.lua", function() end)
print("PremiumPred. installed Press 2x F6")
return
end
if not FileExist(COMMON_PATH .. "GGPrediction.lua") then
DownloadFileAsync("https://raw.githubusercontent.com/gamsteron/GG/master/GGPrediction.lua", COMMON_PATH .. "GGPrediction.lua", function() end)
print("GGPrediction installed Press 2x F6")
return
end
local function Ready(spell)
return myHero:GetSpellData(spell).currentCd == 0 and myHero:GetSpellData(spell).level > 0 and myHero:GetSpellData(spell).mana <= myHero.mana and Game.CanUseSpell(spell) == 0
end
local function GetTarget(range)
if _G.SDK then
if myHero.ap > myHero.totalDamage then
return _G.SDK.TargetSelector:GetTarget(range, _G.SDK.DAMAGE_TYPE_MAGICAL);
else
return _G.SDK.TargetSelector:GetTarget(range, _G.SDK.DAMAGE_TYPE_PHYSICAL);
end
elseif _G.PremiumOrbwalker then
return _G.PremiumOrbwalker:GetTarget(range)
end
end
local function GetMode()
if _G.SDK then
return
_G.SDK.Orbwalker.Modes[_G.SDK.ORBWALKER_MODE_COMBO] and "Combo"
or
_G.SDK.Orbwalker.Modes[_G.SDK.ORBWALKER_MODE_HARASS] and "Harass"
or
_G.SDK.Orbwalker.Modes[_G.SDK.ORBWALKER_MODE_LANECLEAR] and "LaneClear"
or
_G.SDK.Orbwalker.Modes[_G.SDK.ORBWALKER_MODE_JUNGLECLEAR] and "LaneClear"
or
_G.SDK.Orbwalker.Modes[_G.SDK.ORBWALKER_MODE_LASTHIT] and "LastHit"
or
_G.SDK.Orbwalker.Modes[_G.SDK.ORBWALKER_MODE_FLEE] and "Flee"
or nil
elseif _G.PremiumOrbwalker then
return _G.PremiumOrbwalker:GetMode()
end
return nil
end
local function IsImmobileTarget(unit)
for i = 0, unit.buffCount do
local buff = unit:GetBuff(i)
if buff and (buff.type == 5 or buff.type == 11 or buff.type == 29 or buff.type == 24 or buff.name == "recall") and buff.count > 0 then
return true
end
end
return false
end
local sqrt = math.sqrt
local function GetDistanceSqr(p1, p2)
local dx = p1.x - p2.x
local dz = p1.z - p2.z
return (dx * dx + dz * dz)
end
local function GetDistance(p1, p2)
return sqrt(GetDistanceSqr(p1, p2))
end
local function GetDistance2D(p1,p2)
return sqrt((p2.x - p1.x)*(p2.x - p1.x) + (p2.y - p1.y)*(p2.y - p1.y))
end
local function ClosestToMouse(p1, p2)
if GetDistance(mousePos, p1) > GetDistance(mousePos, p2) then return p2 else return p1 end
end
local _OnVision = {}
local function OnVision(unit)
_OnVision[unit.networkID] = _OnVision[unit.networkID] == nil and {state = unit.visible, tick = GetTickCount(), pos = unit.pos} or _OnVision[unit.networkID]
if _OnVision[unit.networkID].state == true and not unit.visible then
_OnVision[unit.networkID].state = false
_OnVision[unit.networkID].tick = GetTickCount()
end
if _OnVision[unit.networkID].state == false and unit.visible then
_OnVision[unit.networkID].state = true
_OnVision[unit.networkID].tick = GetTickCount()
end
return _OnVision[unit.networkID]
end
local _OnWaypoint = {}
function OnWaypoint(unit)
if _OnWaypoint[unit.networkID] == nil then _OnWaypoint[unit.networkID] = {pos = unit.posTo , speed = unit.ms, time = Game.Timer()} end
if _OnWaypoint[unit.networkID].pos ~= unit.posTo then
_OnWaypoint[unit.networkID] = {startPos = unit.pos, pos = unit.posTo , speed = unit.ms, time = Game.Timer()}
DelayAction(function()
local time = (Game.Timer() - _OnWaypoint[unit.networkID].time)
local speed = GetDistance2D(_OnWaypoint[unit.networkID].startPos,unit.pos)/(Game.Timer() - _OnWaypoint[unit.networkID].time)
if speed > 1250 and time > 0 and unit.posTo == _OnWaypoint[unit.networkID].pos and GetDistance(unit.pos,_OnWaypoint[unit.networkID].pos) > 200 then
_OnWaypoint[unit.networkID].speed = GetDistance2D(_OnWaypoint[unit.networkID].startPos,unit.pos)/(Game.Timer() - _OnWaypoint[unit.networkID].time)
end
end,0.05)
end
return _OnWaypoint[unit.networkID]
end
local function GetPred(unit, speed, delay)
local speed = speed or math.huge
local delay = delay or 0.25
local unitSpeed = unit.ms
if OnWaypoint(unit).speed > unitSpeed then unitSpeed = OnWaypoint(unit).speed end
if OnVision(unit).state == false then
local unitPos = unit.pos + Vector(unit.pos,unit.posTo):Normalized() * ((GetTickCount() - OnVision(unit).tick)/1000 * unitSpeed)
local predPos = unitPos + Vector(unit.pos,unit.posTo):Normalized() * (unitSpeed * (delay + (GetDistance(myHero.pos,unitPos)/speed)))
if GetDistance(unit.pos,predPos) > GetDistance(unit.pos,unit.posTo) then predPos = unit.posTo end
return predPos
else
if unitSpeed > unit.ms then
local predPos = unit.pos + Vector(OnWaypoint(unit).startPos,unit.posTo):Normalized() * (unitSpeed * (delay + (GetDistance(myHero.pos,unit.pos)/speed)))
if GetDistance(unit.pos,predPos) > GetDistance(unit.pos,unit.posTo) then predPos = unit.posTo end
return predPos
elseif IsImmobileTarget(unit) then
return unit.pos
else
return unit:GetPrediction(speed,delay)
end
end
end
local castSpell = {state = 0, tick = GetTickCount(), casting = GetTickCount() - 1000, mouse = mousePos}
local function CustomCast(spell, pos, delay)
if pos == nil then return end
if _G.PremiumOrbwalker or _G.SDK then
Control.CastSpell(spell, pos)
elseif _G.GOS then
local ticker = GetTickCount()
if castSpell.state == 0 and ticker - castSpell.casting > delay + Game.Latency() and pos:ToScreen().onScreen then
castSpell.state = 1
castSpell.mouse = mousePos
castSpell.tick = ticker
end
if castSpell.state == 1 then
if ticker - castSpell.tick < Game.Latency() then
Control.SetCursorPos(pos)
Control.KeyDown(spell)
Control.KeyUp(spell)
castSpell.casting = ticker + delay
DelayAction(function()
if castSpell.state == 1 then
Control.SetCursorPos(castSpell.mouse)
castSpell.state = 0
end
end, Game.Latency()/1000)
end
if ticker - castSpell.casting > Game.Latency() then
Control.SetCursorPos(castSpell.mouse)
castSpell.state = 0
end
end
end
end
local function ConvertToHitChance(menuValue, hitChance)
return menuValue == 1 and _G.PremiumPrediction.HitChance.High(hitChance)
or menuValue == 2 and _G.PremiumPrediction.HitChance.VeryHigh(hitChance)
or _G.PremiumPrediction.HitChance.Immobile(hitChance)
end
local function IsRecalling(unit)
local buff = GetBuffData(unit, "recall")
if buff and buff.duration > 0 then
return true, Game.Timer() - buff.startTime
end
return false
end
local function MyHeroNotReady()
return myHero.dead or Game.IsChatOpen() or (_G.JustEvade and _G.JustEvade:Evading()) or (_G.ExtLibEvade and _G.ExtLibEvade.Evading) or IsRecalling(myHero)
end
class "DrMundo"
local QspellData = {speed = 2000, range = 920, delay = 0.5, radius = 30, collision = {"minion"}, type = "linear"}
local PredLoaded = false
function DrMundo:__init()
self:LoadMenu()
Callback.Add("Tick", function() self:Tick() end)
Callback.Add("Draw", function() self:Draw() end)
if not PredLoaded then
DelayAction(function()
if Tocsin.Pred.Change:Value() == 1 then
require('PremiumPrediction')
PredLoaded = true
else
require('GGPrediction')
PredLoaded = true
end
end, 1)
end
end
function DrMundo:LoadMenu()
Tocsin = MenuElement({type = MENU, id = "DrMundo by Tocsin", name = "DrMundoTocsin"})
Tocsin:MenuElement({name = "DrMundo", drop = {ScriptVersion}})
--Combo
Tocsin:MenuElement({type = MENU, id = "Combo", name = "Combo Settings"})
Tocsin.Combo:MenuElement({id = "Q", name = "Use [Q]", value = true})
Tocsin.Combo:MenuElement({id = "W", name = "Use [W]", value = true})
Tocsin.Combo:MenuElement({id = "E", name = "Use [E]", value = true})
Tocsin.Combo:MenuElement({id = "R", name = "Use [R]", value = true})
Tocsin.Combo:MenuElement({id = "Health", name = "Use R if Health lower than", value = 25, min = 0, max = 100, identifier = "%"})
--Clear
Tocsin:MenuElement({type = MENU, id = "Clear", name = "Clear Settings"})
Tocsin.Clear:MenuElement({id = "Q", name = "Use [Q]", value = true})
Tocsin.Clear:MenuElement({id = "W", name = "Use [W]", value = true})
Tocsin.Clear:MenuElement({id = "E", name = "Use [E]", value = true})
Tocsin.Clear:MenuElement({id = "Health", name = "Use W if Health bigger than", value = 25, min = 0, max = 100, identifier = "%"})
--Harass
Tocsin:MenuElement({type = MENU, id = "Harass", name = "Harass Settings"})
Tocsin.Harass:MenuElement({id = "Q", name = "Use [Q]", value = true})
Tocsin.Harass:MenuElement({id = "W", name = "Use [W]", value = true})
Tocsin.Harass:MenuElement({id = "E", name = "Use [E]", value = true})
--LastHit
Tocsin:MenuElement({type = MENU, id = "LastHit", name = "Last Hit"})
Tocsin.LastHit:MenuElement({id = "UseQ", name = "Use Q", value = true})
--Misc
Tocsin:MenuElement({type = MENU, id = "Misc", name = "Misc Settings"})
Tocsin.Misc:MenuElement({id = "Qks", name = "Killsecure [Q]", value = true})
Tocsin.Misc:MenuElement({id = "AutoW", name = "Auto [W]", value = true})
Tocsin:MenuElement({type = MENU, id = "Pred", name = "Prediction Mode"})
Tocsin.Pred:MenuElement({name = " ", drop = {"After change Prediction Typ press 2xF6"}})
Tocsin.Pred:MenuElement({id = "Change", name = "Change Prediction Typ", value = 2, drop = {"Premium Prediction", "GGPrediction"}})
Tocsin.Pred:MenuElement({id = "PredQ", name = "Hitchance[Q]", value = 1, drop = {"Normal", "High", "Immobile"}})
--Draw
Tocsin:MenuElement({type = MENU, id = "Draw", name = "Draw Settings"})
Tocsin.Draw:MenuElement({id = "Q", name = "Draw [Q] Range", value = true})
end
function DrMundo:Tick()
if MyHeroNotReady() then return end
local Mode = GetMode()
if Mode == "Combo" then
self:Combo()
elseif Mode == "Harass" then
self:Harass()
elseif Mode == "LaneClear" then
self:Clear()
elseif Mode == "LastHit" then
self:LastHit()
else
self:AutoW()
end
self:Misc()
end
function DrMundo:Combo()
local target = GetTarget(1500)
if not target then return end
if target ~= myHero.team then
if Tocsin.Combo.Q:Value() and Ready(_Q) and myHero.pos:DistanceTo(target.pos) < 1000 then
self:CastQ(target)
end
if Tocsin.Combo.W:Value() and Ready(_W)and myHero.pos:DistanceTo(target.pos) < 400 and myHero:GetSpellData(_W).toggleState == 1 then
self:CastW(target)
end
if Tocsin.Combo.E:Value() and Ready(_E)and myHero.pos:DistanceTo(target.pos) < 150 then
self:CastE(target)
end
if Tocsin.Combo.R:Value() and Ready(_R) and myHero.pos:DistanceTo(target.pos) < 550 then
if myHero.health/myHero.maxHealth <= Tocsin.Combo.Health:Value() / 100 then
Control.CastSpell(HK_R)
end
end
end
end
function DrMundo:Harass()
local target = GetTarget(1100)
if not target then return end
if target ~= myHero.team then
if Tocsin.Combo.Q:Value() and Ready(_Q) and myHero.pos:DistanceTo(target.pos) < 1000 then
self:CastQ(target)
end
if Tocsin.Combo.W:Value() and Ready(_W)and myHero.pos:DistanceTo(target.pos) < 170 and myHero:GetSpellData(_W).toggleState == 1 then
self:CastW(target)
end
if Tocsin.Combo.E:Value() and Ready(_E)and myHero.pos:DistanceTo(target.pos) < 150 then
self:CastE(target)
end
end
end
function DrMundo:Clear()
for i = 1, Game.MinionCount() do
local minion = Game.Minion(i)
if not minion then return end
if minion.team ~= myHero.team then
if Tocsin.Clear.Q:Value() and Ready(_Q) and ValidTarget(minion, Q.Range) then
if minion:GetCollision(Q.Width, Q.Speed) then
local pos = GetPred(minion, Q.Speed, 0.25 + (Game.Latency()/1000))
CustomCast(HK_Q, pos, 250)
end
end
if Tocsin.Clear.E:Value() and Ready(_E) and myHero.pos:DistanceTo(minion.pos) < 150 then
self:CastE(minion)
end
if Tocsin.Clear.W:Value() and Ready(_W) and ValidTarget(minion, Q.Range) and myHero:GetSpellData(_W).toggleState == 1 then
if myHero.health/myHero.maxHealth >= Tocsin.Clear.Health:Value() / 100 then
self:CastW(minion)
end
end
if Tocsin.Clear.W:Value() and Ready(_W) and myHero:GetSpellData(_W).toggleState == 2 then
if myHero.health/myHero.maxHealth <= Tocsin.Clear.Health:Value() / 100 then
self:CastW(minion)
end
end
end
end
end
function DrMundo:Misc()
local target = GetTarget(1000)
if not target then return end
if target ~= myHero.team then
if Tocsin.Misc.Qks:Value() and Ready(_Q) then
local Qdmg = getdmg("Q", target, myHero)
if Qdmg > target.health then
self:CastQ(target)
end
end
end
end
function DrMundo:CastQ(target)
if Tocsin.Pred.Change:Value() == 1 then
local pred = _G.PremiumPrediction:GetPrediction(myHero, target, QspellData)
if pred.CastPos and ConvertToHitChance(Tocsin.Pred.PredQ:Value(), pred.HitChance) then
Control.CastSpell(HK_Q, pred.CastPos)
end
else
local QPrediction = GGPrediction:SpellPrediction({Type = GGPrediction.SPELLTYPE_LINE, Delay = 0.5, Radius = 30, Range = 920, Speed = 2000, Collision = true, CollisionTypes = {GGPrediction.COLLISION_MINION}})
QPrediction:GetPrediction(target, myHero)
if QPrediction:CanHit(Tocsin.Pred.PredQ:Value() + 1) then
Control.CastSpell(HK_Q, QPrediction.CastPosition)
end
end
end
function DrMundo:CastW(target)
if myHero.pos:DistanceTo(target.pos) < myHero.range then
if myHero.attackData.state == STATE_WINDDOWN then
if myHero:GetSpellData(_W).toggleState == 1 then
Control.CastSpell(HK_W)
end
end
end
if myHero.pos:DistanceTo(target.pos) > myHero.range then
if myHero:GetSpellData(_W).toggleState == 1 then
Control.CastSpell(HK_W)
end
end
end
function DrMundo:CastE(target)
if myHero.pos:DistanceTo(target.pos) < myHero.range then
if myHero.attackData.state == STATE_WINDDOWN then
Control.CastSpell(HK_E)
Control.Attack(target)
end
end
if myHero.pos:DistanceTo(target.pos) > myHero.range then
Control.CastSpell(HK_E)
Control.Attack(target)
end
end
function DrMundo:AutoW()
if Tocsin.Misc.AutoW:Value() then
if myHero:GetSpellData(_W).toggleState == 2 then
Control.CastSpell(HK_W)
end
end
end
-------Check last hitQ and Clear
local function CheckHPPred(unit)
local speed = 2000
local range = myHero.pos:DistanceTo(unit.pos)
local time = range / speed
if _G.SDK and _G.SDK.Orbwalker then
return _G.SDK.HealthPrediction:GetPrediction(unit, time)
elseif _G.PremiumOrbwalker then
return _G.PremiumOrbwalker:GetHealthPrediction(unit, time)
end
end
function DrMundo:LastHit()
if Tocsin.LastHit.UseQ:Value() == false then return end
for i = 1, Game.MinionCount() do
local minion = Game.Minion(i)
if minion and minion.team ~= myHero.team then
local Qdamage = getdmg("Q", minion, myHero)
if Tocsin.LastHit.UseQ:Value() and Ready(_Q) and ValidTarget(minion, Q.Range) then
if (Qdamage >= minion.health and CheckHPPred(minion) >= 1) then
local pos = GetPred(minion, Q.Speed, 0.25 + (Game.Latency()/1000))
--EnableOrb(false)
CustomCast(HK_Q, pos, 250)
--EnableOrb(true)
end
end
end
end
end
function ValidTarget(target, range)
range = range and range or math.huge
return target ~= nil and target.valid and target.visible and not target.dead and target.distance <= range
end
function DrMundo:Draw()
if Tocsin.Draw.Q:Value() and Ready(_Q) then Draw.Circle(myHero.pos, 1100, 3, Draw.Color(255,255, 162, 000)) end
end
Callback.Add("Load", function()
if myHero.charName ~= "DrMundo" then return end
if _G[myHero.charName] then
_G[myHero.charName]()
print("Tocsin "..myHero.charName.." "..ScriptVersion.." Loaded")
else print ("Tocsin doesn't support "..myHero.charName.." shutting down...") return
end
end)