DamnedNooB, on 01 Sept 2018 - 05:09 AM, said:
hard to tell without full code. where did you declare the "Partnership" field? (since you are not returning anything)
here is my full code. please do not laugh..

I'm not a pro .....
if myHero.charName ~= "Kalista" then return end
--print("Have Fun Guys")
--print("by Pussykate")
-- Spell Data
local R = {Range = 1100}
local Partnership = nil
-- Menu
local Kalista = MenuElement({type = MENU, id = "Kalista", name = "Kalista"})
--[[Combo]]
Kalista:MenuElement({type = MENU, id = "WomboCombo", name = "WomboCombo Settings"})
Kalista.WomboCombo/Blitz:MenuElement({id = "R", name = "UseR/Blitzcrank Grab", value = true})
function isReady(slot)
return Game.CanUseSpell(slot) == 0
end
function isValidTarget(obj,range)
range = range and range or math.huge
return obj ~= nil and obj.valid and obj.visible and not obj.dead and obj.isTargetable and obj.distance <= range
end
function HasBuff(unit, buffname)
for i = 0, unit.buffCount do
local buff = unit:GetBuff(i)
if buff and buff.count > 0 and buff.name:lower() == buffname:lower() and buff.expireTime >= Game.Timer() then
return true
end
end
return false
end
function GetBuff(unit, buffname)
for i = 0, unit.buffCount do
local buff = unit:GetBuff(i)
if buff and buff.count > 0 and buff.name:lower() == buffname:lower() and buff.expireTime >= Game.Timer() then
return true
end
end
return false
end
function CountEnemy(pos,range)
local N = 0
for i = 1,Game.HeroCount() do
local hero = Game.Hero(i)
if isValidTarget(hero,range) and hero.isEnemy then
N = N + 1
end
end
return N
end
local function VectorPointProjectionOnLineSegment(v1, v2, v)
local cx, cy, ax, ay, bx, by = v.x, (v.z or v.y), v1.x, (v1.z or v1.y), v2.x, (v2.z or v2.y)
local rL = ((cx - ax) * (bx - ax) + (cy - ay) * (by - ay)) / ((bx - ax) ^ 2 + (by - ay) ^ 2)
local pointLine = { x = ax + rL * (bx - ax), y = ay + rL * (by - ay) }
local rS = rL < 0 and 0 or (rL > 1 and 1 or rL)
local isOnSegment = rS == rL
local pointSegment = isOnSegment and pointLine or { x = ax + rS * (bx - ax), y = ay + rS * (by - ay) }
return pointSegment, pointLine, isOnSegment
end
function FindThePartner()
if Partnership then return end
for i = 1, Game.HeroCount() do
local hero = Game.Hero(i)
if not hero.isMe and hero.isAlly and HasBuff(hero,"kalistacoopstrikeally") and hero.charName == "Blitzcrank" then
--print("Blitzcrank found")
Partnership = hero
end
end
end
function Gethookbuff(hero)
if not unit then return 0 end
for i = 0, unit.buffCount do
local buff = unit:GetBuff(i)
if buff.name and buff.name:lower() == "rocketgrab2" and buff.count > 0 and buff.expireTime >= Game.Timer() then
return buff.count
end
end
return 0
end
function AutoR()
for i = 1, Game.HeroCount() do
local hero = Game.Hero(i)
if hero.isEnemy then
local hook = Gethookbuff(hero)
if hook > 0 and Kalista.WomboCombo/Blitz.R:Value() and Ready(_R) and myHero.pos:DistanceTo(Partnership.pos) < 1100 then
Control.CastSpell(HK_R)
return
end
end
end
end