Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.44 KB | None | 0 0
  1. local isStealthedTable          =       {"Shaco", "Twitch", "Vayne", "Teemo"}
  2. local pinkWard                  =       {range = 600, id = 2043}
  3. local myPlayer                  =       GetMyHero()
  4.  
  5. function OnLoad()
  6.         Menu = scriptConfig("Anti Ward", "jusisnice")
  7.                 Menu:addParam("AutoWard", "Auto Place Pink Ward", SCRIPT_PARAM_ONOFF, true)
  8.                 PrintChat("Auto Pink Ward by Jus")
  9. end
  10.  
  11. function isStealthed_()
  12.         local Enemys_   =       GetEnemyHeroes()
  13.         for i, targets in pairs(Enemys_) do
  14.                 for i=1, isStealthedTable do
  15.                         local char              =       targets.charName
  16.                         local stealthedchar     =       isStealthedTable[i]
  17.                          return char == stealthedchar and ValidTarget(targets, pinkWard.range) and targets.isStealthed                
  18.                 end            
  19.         end
  20. end
  21.  
  22. function PlaceWard()
  23.         local wardslot  =       GetInventorySlotItem(pinkWard.id)
  24.         local wardReady =       (myPlayer:CanUseSpell(pinkWard.id) == READY)
  25.         local mouseX    =       mousePos.x
  26.         local mouseZ    =       mousePos.z    
  27.         if wardslot ~= nil and wardReady and isStealthed_() then
  28.                 CastSpell(wardslot, mouseX, mouseZ)
  29.         end
  30. end
  31.  
  32. function OnTick()
  33.         local AutoWard_ =       Menu.AutoWard
  34.         if AutoWard_ then
  35.                 PlaceWard()
  36.         end
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement