Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Poppy Assistant by HeX ]]--
- if myHero.charName ~= "Poppy" then return end
- require "MapPosition"
- if VIP_USER then
- require "Prodiction"
- local Prodiction = ProdictManager.GetInstance()
- tp = Prodiction:AddProdictionObject(_E, 525, 1600, 0.25, 10, myHero)
- else
- tp = TargetPrediction(rangeMax, 1600, 250)
- end
- --[[ Code ]]--
- local stunDistance, eRange = 300, 525
- function OnLoad()
- PrintChat("<font color='#CCCCCC'> >> Poppy Assistant loaded! <<</font>")
- PSConfig = scriptConfig("Poppy Assistant", "PoppyAssistant")
- PSConfig:addParam("autoStun", "Auto-Stun", SCRIPT_PARAM_ONOFF, true)
- PSConfig:permaShow("autoStun")
- mapPosition = MapPosition()
- end
- function OnTick()
- if PSConfig.autoStun and myHero:CanUseSpell(_E) == READY then
- for i=1, heroManager.iCount do
- Target = heroManager:getHero(i)
- if Target and ValidTarget(Target) and GetDistance(Target) <= eRange then
- if AgainstWall(Target) then
- if GetDistance(Target) <= eRange then
- CastSpell(_E, Target)
- end
- end
- end
- end
- end
- end
- function AgainstWall(target)
- local ePred = tp:GetPrediction(target)
- if ePred then
- TargetPos = Vector(ePred.x, ePred.y, ePred.z)
- MyPos = Vector(myHero.x, myHero.y, myHero.z)
- StunPos = TargetPos + (TargetPos - MyPos)*((stunDistance/GetDistance(ePred)))
- if StunPos and mapPosition:intersectsWall(Point(StunPos.x, StunPos.z)) then return true end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment