Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local isStealthedTable = {"Shaco", "Twitch", "Vayne", "Teemo"}
- local pinkWard = {range = 600, id = 2043}
- local myPlayer = GetMyHero()
- function OnLoad()
- Menu = scriptConfig("Anti Ward", "jusisnice")
- Menu:addParam("AutoWard", "Auto Place Pink Ward", SCRIPT_PARAM_ONOFF, true)
- PrintChat("Auto Pink Ward by Jus")
- end
- function isStealthed_()
- local Enemys_ = GetEnemyHeroes()
- for i, targets in pairs(Enemys_) do
- for i=1, isStealthedTable do
- local char = targets.charName
- local stealthedchar = isStealthedTable[i]
- return char == stealthedchar and ValidTarget(targets, pinkWard.range) and targets.isStealthed
- end
- end
- end
- function PlaceWard()
- local wardslot = GetInventorySlotItem(pinkWard.id)
- local wardReady = (myPlayer:CanUseSpell(pinkWard.id) == READY)
- local mouseX = mousePos.x
- local mouseZ = mousePos.z
- if wardslot ~= nil and wardReady and isStealthed_() then
- CastSpell(wardslot, mouseX, mouseZ)
- end
- end
- function OnTick()
- local AutoWard_ = Menu.AutoWard
- if AutoWard_ then
- PlaceWard()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement