Advertisement
Guest User

Untitled

a guest
Nov 18th, 2015
2,624
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.12 KB | None | 0 0
  1. require("Inspired")
  2. require("IPrediction")
  3. local qSpell = IPrediction.Prediction({range = 900, speed = 1800, delay = 0.25, width = 70, type = "linear", collision = true})
  4.  
  5. IPrediction.OnDash(function(target, y)
  6.     if ValidTarget(target, 1100 + 70) and GetDistance(y) < 1100 + 70 then
  7.         CastSkillShot(_Q, y)
  8.     end
  9. end, qSpell)
  10.  
  11. IPrediction.OnImmobile(function(target, pos, y)
  12.     if y < 140 then
  13.         CastSkillShot(_Q, pos)
  14.     end
  15. end, qSpell)
  16.  
  17. ts = TargetSelector()
  18. OnTick(function()
  19.     target = ts:GetTarget(1100)
  20.     if KeyIsDown(32) then
  21.         local x, y = qSpell:Predict(target)
  22.         print(IPrediction.StateToString[x].." pos: "..tostring(y))
  23.         if x > 2 then
  24.             CastSkillShot(_Q, y.x, y.y, y.z)
  25.         end
  26.     end
  27. end)
  28.  
  29. OnDraw(function()
  30.     if target then
  31.         DrawText("Target: "..GetObjectName(target), 15, 225, 200, 0xffffffff)
  32.     end
  33.     for _, unit in pairs(GetEnemyHeroes()) do
  34.         local x, y, z = IPrediction.Collision(myHero, unit, qSpell)
  35.         DrawText(""..GetObjectName(unit), 15, 225, 225 + 75*_, 0xffffffff)
  36.         DrawText(""..tostring(x), 15, 250, 250 + 75*_, 0xffffffff)
  37.         DrawText(""..tostring(y), 15, 250, 275 + 75*_, 0xffffffff)
  38.     end
  39. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement