
Karthus Q Spammer
By: a guest on
Sep 4th, 2012 | syntax:
Lua | size: 1.33 KB | hits: 27 | expires: Never
--[[
Karthus Q Spammer by eXtragoZ
]]--
local player = GetMyHero()
if player.charName == "Karthus" then
--[[ Config ]]
local HK = 32 -- Space key
local timeLag = .75
local range = 950
--[[ Code ]]
function altDoFile(name)
dofile(debug.getinfo(1).source:sub(debug.getinfo(1).source:find(".*\\")):sub(2)..name)
end
altDoFile("libs/TimingLib.lua")
altDoFile("libs/target_selector.lua")
local active = false
local timer
local ts
local targeti
function OnLoad()
timer = Timer:new()
ts = TargetSelector:new(TARGET_LOW_HP,range,DAMAGE_MAGIC)
end
function OnTick()
KQShotkeys()
ts:tick()
timer:tickHandler()
if active then
if ts.target ~= nil and player:CanUseSpell(_Q) then
for i=1, heroManager.iCount do
local enemy = heroManager:GetHero(i)
if enemy ~= nil and enemy.team ~= player.team and enemy.charName == ts.target.charName then
targeti = i
end
end
local targetNextMove = timer:predictMovement(targeti, timeLag)
CastSpell(_Q, targetNextMove.x, targetNextMove.z)
end
end
end
function KQShotkeys()
if IsKeyPressed(HK) or IsKeyDown(HK) then
active = true
else
active = false
end
end
function OnDraw()
if not player.dead then
DrawCircle(player.x, player.y, player.z, range, 0x19A712)
end
end
PrintChat(" >> Karthus Q Spammer loaded!")
end