Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HK=32 --spacebar
- DFGId = 3128
- scriptActive = false
- function Timer(tick)
- invSlot = findItemSlotInInventory(DFGId)
- local players = GetHeroCount()
- for i=1, players, 1 do
- local target = GetHero(i)
- x,y,z = GetMousePosition()
- if target ~= nil and target.team == TEAM_ENEMY and scriptActive == true and player:GetDistanceTo(target) < 625 then
- player:UseSpell(invSlot, findHeroNearestMouse(players))
- player:UseSpell(_Q, findHeroNearestMouse(players))
- player:UseSpell(_W, findHeroNearestMouse(players))
- player:UseSpell(_E, player)
- player:UseSpell(_R, findHeroNearestMouse(players))
- end
- end
- end
- function findHeroNearestMouse(players)
- local closest
- for i=1, players, 1 do
- local target = GetHero(i)
- if target ~= nil then
- if (distanceFromMouse(target) < distanceFromMouse(closest) or closest == nil) then
- closest = target
- end
- end
- end
- return closest
- end
- function Hotkey(msg,key)
- if msg == KEY_DOWN then
- --key down
- if key == HK then
- scriptActive = true
- elseif key == qMinionKey then
- if qMinionsActive then
- qMinionsActive = false
- PrintChat(" >> Auto Q minions disabled!")
- else
- qMinionsActive = true
- PrintChat(" >> Auto Q minions enabled!")
- end
- end
- else
- if key == HK then
- scriptActive = false
- end
- end
- end
- function findItemSlotInInventory( item )
- local ItemSlot = {ITEM_SLOT_1,ITEM_SLOT_2,ITEM_SLOT_3,ITEM_SLOT_4,ITEM_SLOT_5,ITEM_SLOT_6,}
- for i=1, 6, 1 do
- if player:GetInventorySlot(ItemSlot[i]) == item then return ItemSlot[i] end
- end
- end
- function distanceFromMouse(target)
- x,y,z = GetMousePosition()
- if target ~= nil then
- return math.floor(math.sqrt((target.x-x)*(target.x-x) + (target.z-z)*(target.z-z)))
- else return 5000
- end
- end
- function Drawer()
- if player.dead then return end
- DrawCircle(650,player.x, player.y, player.z)
- end
- function Load()
- if player.charName ~= "Annie" then
- PrintChat(" >> NO Leblanc")
- script:Unload()
- else
- script.timerCallback = {name = "Timer", interval = 100 }
- script.keyCallback = "Hotkey"
- PrintChat(" >> Annie Helper loaded!")
- end
- end
Add Comment
Please, Sign In to add comment