Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

My Script Only Works on Ageinst Bots


  • Please log in to reply
No replies to this topic

#1
Sad

Sad

    Advanced Member

  • Members
  • 30 posts

Hi  could  someone help me with this problem please . It is working correctly ageinst bots but if my target is a real player I'm getting an error.

OnTick(function()
target = GetCurrentTarget()
    SpellCooldown()
end)

function SpellCooldown()
    local champTable = {"Renekton","MonkeyKing","Garen"}
    for i = 1 , #champTable do
        if target.name:find(champTable[i])  then
            if champTable[i] == "Renekton" then
                if  ValidTarget(target,3000) then
                    SpellCd = target:GetSpellData(_W).currentCd
                    if SpellCd <= 3 or GotBuff(target,"RenektonPreExecute") > 0 then
                        lockE = true
                    elseif SpellCd > 3 then
                        lockE = false
                    else
                        lockE = false
                    end
                end
            end
            --
            if champTable[i] == "MonkeyKing" then
                if ValidTarget(target,3000) then
                    SpellCd = target:GetSpellData(_Q).currentCd
                    if SpellCd <= 3 or GotBuff(target,"MonkeyKingDoubleAttack") > 0 then
                        lockE = true
                    elseif SpellCd > 3 then
                        lockE = false
                    else
                        lockE = false
                    end
                end
            end
            --
            if champTable[i] == "Garen" then
                if ValidTarget(target,3000) then
                    SpellCd = target:GetSpellData(_Q).currentCd
                    if  GotBuff(target,"GarenQ") > 0 then
                        lockE = true
                    elseif SpellCd < 3 then
                        lockE = true
                    else
                        lockE = false
                    end
                end
            end
        end
    end
end




OnDraw(function()
    if SpellCd == nil then return end
-- xd
    unitvec = Vector(GetDirection(myHero)):normalized()
    textpos3d = GetOrigin(myHero) + (unitvec * 200)
    datas = WorldToScreen(1, textpos3d)
-- xd

DrawText("Cooldown: " .. SpellCd,20, datas.x, datas.y - 10, GoS.White)

if lockE == false then
    DrawText("LOCKE::FALSE",20, datas.x, datas.y - 30,ARGB(255,252,57,57))
elseif lockE == true then
    DrawText("LOCKE::TRUE",20, datas.x, datas.y - 30,ARGB(255,48,242,74))
end

end)


Edited by Sad, 05 December 2017 - 12:52 .

  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users