Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require("Inspired")
- require("IPrediction")
- local qSpell = IPrediction.Prediction({range = 900, speed = 1800, delay = 0.25, width = 70, type = "linear", collision = true})
- IPrediction.OnDash(function(target, y)
- if ValidTarget(target, 1100 + 70) and GetDistance(y) < 1100 + 70 then
- CastSkillShot(_Q, y)
- end
- end, qSpell)
- IPrediction.OnImmobile(function(target, pos, y)
- if y < 140 then
- CastSkillShot(_Q, pos)
- end
- end, qSpell)
- ts = TargetSelector()
- OnTick(function()
- target = ts:GetTarget(1100)
- if KeyIsDown(32) then
- local x, y = qSpell:Predict(target)
- print(IPrediction.StateToString[x].." pos: "..tostring(y))
- if x > 2 then
- CastSkillShot(_Q, y.x, y.y, y.z)
- end
- end
- end)
- OnDraw(function()
- if target then
- DrawText("Target: "..GetObjectName(target), 15, 225, 200, 0xffffffff)
- end
- for _, unit in pairs(GetEnemyHeroes()) do
- local x, y, z = IPrediction.Collision(myHero, unit, qSpell)
- DrawText(""..GetObjectName(unit), 15, 225, 225 + 75*_, 0xffffffff)
- DrawText(""..tostring(x), 15, 250, 250 + 75*_, 0xffffffff)
- DrawText(""..tostring(y), 15, 250, 275 + 75*_, 0xffffffff)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement