Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class("ProdictManager")
- ProdictManager.instance = ""
- function ProdictManager.__init(A0_0)
- local L1_1, L2_2, L3_3, L4_4
- A0_0.WayPointManager = L1_1
- A0_0.status = 0
- A0_0.allies = false
- A0_0.ewrgwergwew = "2"
- A0_0.spells = L1_1
- A0_0.heroes = L1_1
- for L4_4 = 1, L2_2.iCount do
- A0_0.heroes[heroManager:GetHero(L4_4).networkID] = {
- dash = {},
- pull = {},
- root = {},
- vision = heroManager:GetHero(L4_4).visible and 0 or 20000
- }
- end
- function L4_4(A0_5, A1_6)
- A0_0:OnDash(A0_5, A1_6)
- end
- L1_1(L2_2, L3_3, L4_4)
- function L4_4(A0_7)
- A0_0:OnLoseVision(A0_7)
- end
- L1_1(L2_2, L3_3, L4_4)
- function L4_4(A0_8)
- A0_0:OnGainVision(A0_8)
- end
- L1_1(L2_2, L3_3, L4_4)
- function L4_4(A0_9, A1_10)
- A0_0:OnGainBuff(A0_9, A1_10)
- end
- L1_1(L2_2, L3_3, L4_4)
- function L4_4(A0_11, A1_12)
- A0_0:OnLoseBuff(A0_11, A1_12)
- end
- L1_1(L2_2, L3_3, L4_4)
- function L4_4(A0_13, A1_14)
- A0_0:OnUpdateBuff(A0_13, A1_14)
- end
- L1_1(L2_2, L3_3, L4_4)
- L1_1(L2_2)
- L1_1(L2_2)
- L4_4 = "USERNAME"
- L4_4 = os
- L4_4 = L4_4.getenv
- L4_4 = L4_4("COMPUTERNAME")
- L4_4 = "%s+"
- L4_4 = ","
- L4_4 = "?hwid="
- L4_4 = L4_4 .. L1_1 .. "&name=" .. GetUser()
- L2_2(L3_3, L4_4, function(A0_15)
- A0_0:FinishRegister(A0_15)
- end)
- L4_4 = "Status/prodiction/version.php"
- L2_2(L3_3, L4_4, function(A0_16)
- A0_0:Version(A0_16)
- end)
- end
- function ProdictManager.Version(A0_17, A1_18)
- local L2_19, L3_20
- L2_19 = A0_17.ewrgwergwew
- if A1_18 ~= L2_19 then
- L2_19 = print
- L3_20 = "<font color='#FF0000'>There is a new version of Prodiction. Auto Update. Don't F9 till done...</font>"
- L2_19(L3_20)
- L2_19 = "http://www.imklokje.com/Status/prodiction/Prodiction.lua"
- L3_20 = BOL_PATH
- L3_20 = L3_20 .. "Scripts\\Common\\Prodiction.lua"
- DownloadFile(L2_19, L3_20, function()
- if FileExist(L3_20) then
- PrintChat("<font color='#00AAFF'> Prodiction is Updated, Reload script for new version.</font>")
- end
- end)
- else
- end
- end
- function ProdictManager.FinishRegister(A0_21, A1_22)
- inputstr = A1_22
- sep = ":"
- if sep == nil then
- sep = "%s"
- end
- t = {}
- i = 1
- for _FORV_5_ in string.gmatch(inputstr, "([^" .. sep .. "]+)") do
- t[i] = _FORV_5_
- i = i + 1
- end
- if t and #t >= 1 and t[1] then
- if t[1] == "Succes" then
- print("<font color='#AAFF00'>" .. A1_22 .. "</font>")
- A0_21.allies = true
- A0_21.status = 1
- elseif t[1] == "Error" then
- print("<font color='#FF0000'>" .. A1_22 .. "</font>")
- elseif t[1] == "Vip User" then
- print("<font color='#AAFF00'>" .. A1_22 .. "</font>")
- end
- end
- end
- function ProdictManager.GetInstance()
- local L0_23
- L0_23 = ProdictManager
- L0_23 = L0_23.instance
- if L0_23 == "" then
- L0_23 = ProdictManager
- L0_23.instance = ProdictManager()
- end
- L0_23 = ProdictManager
- L0_23 = L0_23.instance
- return L0_23
- end
- function ProdictManager.GetTarget(A0_24)
- if not ProdictManager.GetInstance().heroes[A0_24] then
- ProdictManager.GetInstance().heroes[A0_24] = {
- dash = {},
- pull = {},
- root = {},
- vision = 0
- }
- end
- return ProdictManager.GetInstance().heroes[A0_24]
- end
- function ProdictManager.OnTick(A0_25)
- local L1_26, L2_27, L3_28, L4_29, L5_30, L6_31, L7_32, L8_33, L9_34
- if not L1_26 then
- return L1_26
- end
- for L4_29, L5_30 in L1_26(L2_27) do
- for L9_34, _FORV_10_ in L6_31(L7_32) do
- if _FORV_10_ <= GetGameTimer() then
- table.remove(L5_30.dash, L9_34)
- end
- end
- end
- end
- function ProdictManager.OnDash(A0_35, A1_36, A2_37)
- if not A0_35.allies then
- return false
- end
- if A1_36 and A0_35.heroes[A1_36.networkID] then
- table.insert(A0_35.heroes[A1_36.networkID].dash, A2_37.endT)
- end
- end
- function ProdictManager.OnLoseVision(A0_38, A1_39)
- local L2_40, L3_41
- if A1_39 then
- L2_40 = A0_38.heroes
- L3_41 = A1_39.networkID
- L2_40 = L2_40[L3_41]
- if L2_40 then
- L2_40 = A0_38.heroes
- L3_41 = A1_39.networkID
- L2_40 = L2_40[L3_41]
- L2_40.vision = 20000
- end
- end
- end
- function ProdictManager.OnGainVision(A0_42, A1_43)
- local L2_44
- if A1_43 then
- L2_44 = A0_42.heroes
- L2_44 = L2_44[A1_43.networkID]
- if L2_44 then
- L2_44 = A0_42.heroes
- L2_44 = L2_44[A1_43.networkID]
- L2_44.vision = GetGameTimer()
- end
- end
- end
- function ProdictManager.OnGainBuff(A0_45, A1_46, A2_47)
- local L3_48, L4_49, L5_50
- L3_48 = A0_45.allies
- if not L3_48 then
- L3_48 = false
- return L3_48
- end
- if A1_46 then
- L3_48 = A0_45.heroes
- L4_49 = A1_46.networkID
- L3_48 = L3_48[L4_49]
- if L3_48 then
- L3_48 = A2_47.type
- L4_49 = BUFF_STUN
- if L3_48 ~= L4_49 then
- L3_48 = A2_47.type
- L4_49 = BUFF_ROOT
- if L3_48 ~= L4_49 then
- L3_48 = A2_47.type
- L4_49 = BUFF_KNOCKUP
- if L3_48 ~= L4_49 then
- L3_48 = A2_47.type
- L4_49 = BUFF_SUPPRESS
- if L3_48 ~= L4_49 then
- L3_48 = A2_47.name
- if L3_48 ~= "zhonyasringshield" then
- L3_48 = A2_47.name
- end
- end
- end
- end
- else
- if L3_48 == "lissandrarself" then
- L3_48 = A0_45.heroes
- L4_49 = A1_46.networkID
- L3_48 = L3_48[L4_49]
- L3_48 = L3_48.root
- L4_49 = A2_47.slot
- L5_50 = A2_47.endT
- L3_48[L4_49] = L5_50
- end
- else
- L3_48 = A2_47.type
- L4_49 = BUFF_KNOCKBACK
- if L3_48 == L4_49 then
- L3_48 = A0_45.heroes
- L4_49 = A1_46.networkID
- L3_48 = L3_48[L4_49]
- L3_48 = L3_48.pull
- L4_49 = A2_47.slot
- L5_50 = A2_47.endT
- L3_48[L4_49] = L5_50
- end
- end
- end
- end
- end
- function ProdictManager.OnUpdateBuff(A0_51, A1_52, A2_53)
- local L3_54, L4_55, L5_56
- L3_54 = A0_51.allies
- if not L3_54 then
- L3_54 = false
- return L3_54
- end
- if A1_52 then
- L3_54 = A0_51.heroes
- L4_55 = A1_52.networkID
- L3_54 = L3_54[L4_55]
- if L3_54 then
- L3_54 = A0_51.heroes
- L4_55 = A1_52.networkID
- L3_54 = L3_54[L4_55]
- L3_54 = L3_54.root
- L4_55 = A2_53.slot
- L3_54 = L3_54[L4_55]
- if L3_54 ~= nil then
- L3_54 = A0_51.heroes
- L4_55 = A1_52.networkID
- L3_54 = L3_54[L4_55]
- L3_54 = L3_54.root
- L4_55 = A2_53.slot
- L5_56 = A2_53.endT
- L3_54[L4_55] = L5_56
- else
- L3_54 = A0_51.heroes
- L4_55 = A1_52.networkID
- L3_54 = L3_54[L4_55]
- L3_54 = L3_54.pull
- L4_55 = A2_53.slot
- L3_54 = L3_54[L4_55]
- if L3_54 ~= nil then
- L3_54 = A0_51.heroes
- L4_55 = A1_52.networkID
- L3_54 = L3_54[L4_55]
- L3_54 = L3_54.pull
- L4_55 = A2_53.slot
- L5_56 = A2_53.endT
- L3_54[L4_55] = L5_56
- end
- end
- end
- end
- end
- function ProdictManager.OnLoseBuff(A0_57, A1_58, A2_59)
- local L3_60, L4_61
- L3_60 = A0_57.allies
- if not L3_60 then
- L3_60 = false
- return L3_60
- end
- if A1_58 then
- L3_60 = A0_57.heroes
- L4_61 = A1_58.networkID
- L3_60 = L3_60[L4_61]
- if L3_60 then
- L3_60 = A0_57.heroes
- L4_61 = A1_58.networkID
- L3_60 = L3_60[L4_61]
- L3_60 = L3_60.root
- L4_61 = A2_59.slot
- L3_60[L4_61] = nil
- L3_60 = A0_57.heroes
- L4_61 = A1_58.networkID
- L3_60 = L3_60[L4_61]
- L3_60 = L3_60.pull
- L4_61 = A2_59.slot
- L3_60[L4_61] = nil
- end
- end
- end
- function ProdictManager.AddProdictionObject(A0_62, A1_63, A2_64, A3_65, A4_66, A5_67, A6_68, A7_69, A8_70)
- local L9_71
- L9_71 = Prodict
- L9_71 = L9_71(A1_63, A2_64, A3_65, A4_66, A5_67, A6_68, A7_69, A8_70)
- table.insert(A0_62.spells, L9_71)
- return L9_71
- end
- class("Prodict")
- function Prodict.__init(A0_72, A1_73, A2_74, A3_75, A4_76, A5_77, A6_78, A7_79, A8_80)
- local L9_81, L10_82
- L9_81 = {}
- L9_81.Name = A1_73
- L10_82 = fromPos
- L10_82 = L10_82 or myHero
- L9_81.Source = L10_82
- if A2_74 then
- L10_82 = A2_74 ^ 2
- else
- L10_82 = L10_82 or 20000
- end
- L9_81.RangeSqr = L10_82
- L10_82 = A3_75 or 20000
- L9_81.Speed = L10_82
- L10_82 = A4_76 or 0
- L9_81.Delay = L10_82
- L9_81.Width = A5_77
- A0_72.Spell = L9_81
- L9_81 = {}
- A0_72.enemys = L9_81
- A0_72.enable = true
- L9_81 = A8_80 or true
- A0_72.offAfterCast = L9_81
- A0_72.callback = A7_79
- end
- function Prodict.EnableTarget(A0_83, A1_84, A2_85, A3_86)
- A2_85 = A2_85 or true
- A0_83.Spell.Source = A3_86 or myHero
- if A0_83.enemys[A1_84.networkID] == nil then
- A0_83.enemys[A1_84.networkID] = TProdiction(A1_84, A2_85, A0_83)
- else
- A0_83.enemys[A1_84.networkID]:Enable(A2_85)
- end
- end
- function Prodict.CanNotMissMode(A0_87, A1_88, A2_89)
- if A2_89 == nil then
- for _FORV_6_, _FORV_7_ in pairs(A0_87.enemys) do
- A0_87.enemys[_FORV_7_.networkID]:CanNotMissMode(A1_88)
- end
- else
- if A0_87.enemys[A2_89.networkID] == nil then
- A0_87.enemys[A2_89.networkID] = TProdiction(A2_89, false, A0_87)
- end
- A0_87.enemys[A2_89.networkID]:CanNotMissMode(A1_88)
- end
- end
- function Prodict.GetPrediction(A0_90, A1_91, A2_92)
- local L3_93, L4_94, L5_95, L6_96, L7_97, L8_98, L9_99
- if A2_92 then
- L3_93 = A0_90.Spell
- L3_93 = L3_93.Speed
- L3_93 = L3_93 * A2_92
- elseif not L3_93 then
- L3_93 = A0_90.Spell
- L3_93 = L3_93.Speed
- end
- if A2_92 then
- L4_94 = A2_92 - 1
- L4_94 = L4_94 / 3
- L4_94 = L4_94 + 1
- else
- L4_94 = L4_94 or 1
- end
- if L4_94 then
- L5_95 = A0_90.Spell
- L5_95 = L5_95.Delay
- L5_95 = L5_95 / L4_94
- elseif not L5_95 then
- L5_95 = A0_90.Spell
- L5_95 = L5_95.Delay
- end
- L6_96 = ProdictManager
- L6_96 = L6_96.GetInstance
- L6_96 = L6_96()
- L6_96 = L6_96.WayPointManager
- L7_97 = L6_96
- L6_96 = L6_96.GetSimulatedWayPoints
- L8_98 = A1_91
- L9_99 = GetLatency
- L9_99 = L9_99()
- L9_99 = L9_99 / 2
- L9_99 = L9_99 / 1000
- L9_99 = L5_95 + L9_99
- L6_96 = L6_96(L7_97, L8_98, L9_99)
- L7_97, L8_98 = nil, nil
- L9_99 = assert
- L9_99(L3_93 > 0 and L5_95 >= 0, "TargetPredictionVIP:GetPrediction : SpellDelay must be >=0 and SpellSpeed must be >0")
- L9_99 = #L6_96
- if L9_99 == 1 or L3_93 == 20000 then
- L9_99 = {}
- L9_99.x = L6_96[1].x
- L9_99.y = A1_91.y
- L9_99.z = L6_96[1].y
- L7_97 = L9_99
- L9_99 = GetDistance
- L9_99 = L9_99(L6_96[1], A0_90.Spell.Source)
- L8_98 = L9_99 / L3_93
- else
- L9_99 = 0
- for _FORV_13_ = 1, #L6_96 - 1 do
- if L9_99 <= ((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) - math.sqrt((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (L3_93 * L3_93 - 1) + A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + 2 * ((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))) * ((A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))) + (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (L3_93 * L3_93 - A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))))) / (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) - L3_93 * L3_93) and L9_99 + GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) / A1_91.ms >= ((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) - math.sqrt((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (L3_93 * L3_93 - 1) + A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + 2 * ((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))) * ((A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))) + (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (L3_93 * L3_93 - A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))))) / (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) - L3_93 * L3_93) then
- L8_98, L7_97 = ((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) - math.sqrt((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (L3_93 * L3_93 - 1) + A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + 2 * ((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))) * ((A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))) + (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (L3_93 * L3_93 - A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))))) / (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) - L3_93 * L3_93), {
- x = L6_96[_FORV_13_].x + ((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) - math.sqrt((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (L3_93 * L3_93 - 1) + A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + 2 * ((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))) * ((A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))) + (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (L3_93 * L3_93 - A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))))) / (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) - L3_93 * L3_93) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])),
- y = A1_91.y,
- z = L6_96[_FORV_13_].y + ((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) - math.sqrt((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (L3_93 * L3_93 - 1) + A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + 2 * ((A0_90.Spell.Source.z - L6_96[_FORV_13_].y) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))) * ((A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))) + (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (A0_90.Spell.Source.x - L6_96[_FORV_13_].x) * (L3_93 * L3_93 - A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))))) / (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) + A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) * (A1_91.ms * (L6_96[_FORV_13_ + 1].x - L6_96[_FORV_13_].x) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1])) - L3_93 * L3_93) * (A1_91.ms * (L6_96[_FORV_13_ + 1].y - L6_96[_FORV_13_].y) / GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]))
- }
- break
- end
- if _FORV_13_ == #L6_96 - 1 then
- L8_98, L7_97 = L9_99 + GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) / A1_91.ms, {
- x = L6_96[_FORV_13_ + 1].x,
- y = A1_91.y,
- z = L6_96[_FORV_13_ + 1].y
- }
- end
- L9_99 = L9_99 + GetDistance(L6_96[_FORV_13_], L6_96[_FORV_13_ + 1]) / A1_91.ms
- end
- end
- if L7_97 then
- L9_99 = A0_90.Spell
- L9_99 = L9_99.RangeSqr
- if L9_99 >= GetDistanceSqr(L7_97, A0_90.Spell.Source) then
- L9_99 = L7_97
- return L9_99, L8_98
- end
- end
- end
- class("TProdiction")
- function TProdiction.__init(A0_100, A1_101, A2_102, A3_103)
- A0_100.target = A1_101
- A0_100.enable = A2_102
- A0_100.enableTime = GetGameTimer()
- A0_100.prodict = A3_103
- A0_100.canNotMiss = false
- AdvancedCallback:bind("OnDash", function(A0_104, A1_105)
- A0_100:OnDash(A0_104, A1_105)
- end)
- AdvancedCallback:bind("OnGainBuff", function(A0_106, A1_107)
- A0_100:OnGainBuff(A0_106, A1_107)
- end)
- AddTickCallback(function()
- A0_100:OnTick()
- end)
- AddRecvPacketCallback(function(A0_108)
- A0_100:OnRecvPacket(A0_108)
- end)
- end
- function TProdiction.CanNotMissMode(A0_109, A1_110)
- A0_109.canNotMiss = A1_110
- end
- function TProdiction.Enable(A0_111, A1_112)
- A0_111.enable = A1_112
- A0_111.enableTime = GetGameTimer()
- end
- function TProdiction.OnDash(A0_113, A1_114, A2_115)
- if not ProdictManager.GetInstance().allies then
- return false
- end
- if not A0_113.canNotMiss and not A0_113.enable then
- return
- end
- if A1_114.networkID == A0_113.target.networkID then
- distance = GetDistance(A2_115.endPos, A0_113.prodict.Spell.Source)
- if distance * distance <= A0_113.prodict.Spell.RangeSqr then
- duration = distance / A0_113.prodict.Spell.Speed
- if A0_113.prodict.Spell.Delay + duration - 0.45 < A2_115.duration then
- wait = A2_115.duration - (duration + A0_113.prodict.Spell.Delay)
- if wait <= 0 then
- A0_113.prodict.callback(A0_113.target, A2_115.endPos, A0_113.prodict.Spell)
- else
- DelayAction(function(A0_116)
- A0_113.prodict.callback(A0_113.target, A0_116, A0_113.prodict.Spell)
- end, wait, {
- A2_115.endPos
- })
- end
- end
- end
- end
- end
- function TProdiction.OnGainBuff(A0_117, A1_118, A2_119)
- if not ProdictManager.GetInstance().allies then
- return false
- end
- if not A0_117.canNotMiss and not A0_117.enable then
- return
- end
- if A1_118 and A1_118.networkID == A0_117.target.networkID and (A2_119.name == "zhonyasringshield" or A2_119.name == "lissandrarself" or A2_119.type == BUFF_STUN or A2_119.type == BUFF_ROOT or A2_119.type == BUFF_KNOCKUP or A2_119.type == BUFF_SUPPRESS) then
- distance = GetDistance(A1_118, A0_117.prodict.Spell.Source)
- if distance * distance <= A0_117.prodict.Spell.RangeSqr then
- duration = distance / A0_117.prodict.Spell.Speed
- if A0_117.prodict.Spell.Delay + duration - 0.45 < A2_119.duration then
- wait = A2_119.duration - (duration + A0_117.prodict.Spell.Delay)
- if wait <= 0 then
- A0_117.prodict.callback(A0_117.target, A1_118, A0_117.prodict.Spell)
- else
- DelayAction(function(A0_120)
- A0_117.prodict.callback(A0_117.target, A0_120, A0_117.prodict.Spell)
- end, wait, {A1_118})
- end
- end
- end
- end
- end
- function TProdiction.OnRecvPacket(A0_121, A1_122)
- local L2_123, L3_124, L4_125, L5_126, L6_127, L7_128
- L2_123 = A0_121.enable
- if not L2_123 then
- return
- end
- L2_123 = A1_122.header
- if L2_123 == L3_124 then
- L2_123 = Packet
- L2_123 = L2_123(L3_124)
- if L3_124 == L4_125 then
- L6_127 = L2_123
- L7_128 = "wayPoints"
- L7_128 = L5_126(L6_127, L7_128)
- L3_124(L4_125, L5_126, L6_127, L7_128, L5_126(L6_127, L7_128))
- end
- else
- L2_123 = A1_122.header
- if L2_123 == L3_124 then
- L2_123 = Packet
- L2_123 = L2_123(L3_124)
- L6_127 = "wayPoints"
- L7_128 = L4_125(L5_126, L6_127)
- for L6_127, L7_128 in L3_124(L4_125, L5_126, L6_127, L7_128, L4_125(L5_126, L6_127)) do
- if L6_127 == A0_121.target.networkID then
- A0_121:OnNewWayPoints(L7_128)
- end
- end
- end
- end
- end
- function TProdiction.OnNewWayPoints(A0_129, A1_130)
- local L2_131, L3_132, L4_133, L5_134
- L2_131 = A0_129.prodict
- L2_131 = L2_131.Spell
- L2_131 = L2_131.Source
- if L2_131 ~= nil then
- L2_131 = ProdictManager
- L2_131 = L2_131.GetInstance
- L2_131 = L2_131()
- L2_131 = L2_131.WayPointManager
- L3_132 = L2_131
- L2_131 = L2_131.GetWayPointChangeRate
- L4_133 = A0_129.target
- L5_134 = 1
- L2_131 = L2_131(L3_132, L4_133, L5_134)
- L3_132 = ProdictManager
- L3_132 = L3_132.GetInstance
- L3_132 = L3_132()
- L3_132 = L3_132.WayPointManager
- L4_133 = L3_132
- L3_132 = L3_132.GetWayPoints
- L5_134 = A0_129.target
- L3_132 = L3_132(L4_133, L5_134)
- if L2_131 ~= 1 or L2_131 ~= 2 then
- L4_133 = L2_131 - 2
- if L4_133 < 0 then
- L2_131 = 0
- end
- L4_133 = L2_131 * 0.25
- L4_133 = 1 + L4_133
- L5_134 = #L3_132
- if L5_134 > 1 then
- L5_134 = GetDistance
- L5_134 = L5_134(L3_132[#L3_132], A0_129.target)
- if L5_134 < 300 then
- L5_134 = 0
- if 0 < L2_131 - 4 then
- L5_134 = L2_131 - 4
- end
- L4_133 = L4_133 + L5_134
- end
- end
- L5_134 = A0_129.prodict
- L5_134 = L5_134.GetPrediction
- L5_134 = L5_134(L5_134, A0_129.target, L4_133)
- if L5_134 ~= nil and not IsWall(D3DXVECTOR3(L5_134.x, A0_129.target.y, L5_134.z)) and A0_129:IsValid() and A0_129.enable and A0_129.prodict.enable then
- A0_129.prodict.callback(A0_129.target, L5_134, A0_129.prodict.Spell)
- if A0_129.prodict.offAfterCast then
- A0_129.enable = false
- end
- end
- end
- end
- end
- function TProdiction.IsValid(A0_135)
- if A0_135.target and A0_135.target.valid and A0_135.target.visible and A0_135.target.bInvulnerable == 0 and A0_135.target.bTargetable and A0_135.target.type == myHero.type and GetGameTimer() - ProdictManager.GetTarget(A0_135.target.networkID).vision > 0.125 then
- for _FORV_5_, _FORV_6_ in pairs(ProdictManager.GetTarget(A0_135.target.networkID).pull) do
- return false
- end
- for _FORV_5_, _FORV_6_ in pairs(ProdictManager.GetTarget(A0_135.target.networkID).dash) do
- return false
- end
- return true
- else
- return false
- end
- end
- function TProdiction.OnTick(A0_136)
- if A0_136.enable and A0_136:IsValid() then
- for _FORV_5_, _FORV_6_ in pairs(ProdictManager.GetTarget(A0_136.target.networkID).root) do
- if _FORV_6_ > GetGameTimer() + GetDistance(A0_136.target, A0_136.prodict.Spell.Source) / A0_136.prodict.Spell.Speed and GetDistanceSqr(A0_136.target, A0_136.prodict.Spell.Source) <= A0_136.prodict.Spell.RangeSqr and A0_136.enable and A0_136.prodict.enable then
- A0_136.prodict.callback(A0_136.target, A0_136.target, A0_136.prodict.Spell)
- if A0_136.prodict.offAfterCast then
- A0_136.enable = false
- end
- end
- end
- if #ProdictManager.GetInstance().WayPointManager:GetWayPoints(A0_136.target) <= 1 and A0_136.enable and A0_136.prodict.enable then
- A0_136.prodict.callback(A0_136.target, A0_136.target, A0_136.prodict.Spell)
- end
- end
- if A0_136.enableTime + 0.3 < GetGameTimer() then
- A0_136.enable = false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement