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

any one can help me auto cast soraka R


  • Please log in to reply
12 replies to this topic

#1
snowbell

snowbell

    Advanced Member

  • Members
  • 144 posts

hi devs can any one help me how to auto cast soraka R even not pressing combo 

		for _, ally in pairs(GetAllyHeroes()) do

			if (GetCurrentHP(ally)/GetMaxHP(ally))<0.2 and
	            	CanUseSpell(myHero, _R) == READY and IsObjectAlive(ally) then
			CastSpell(_R)
	end
end	

  • 0

#2
Zwei

Zwei

    Advanced Member

  • Contributor
  • 2,201 posts

https://github.com/L...ster/Soraka.lua

If you understand functions. If not just put your code in OnTick()

OnTick(function (myHero)
  if Ready(_R) then
    for _, ally in pairs(GetAllyHeroes()) do
     if (GetCurrentHP(ally)/GetMaxHP(ally))<0.2 and  Ready(_R) and IsObjectAlive(ally) then
      CastSpell(_R)
    end
  end
end)

  • 0

#3
snowbell

snowbell

    Advanced Member

  • Members
  • 144 posts

 

https://github.com/L...ster/Soraka.lua

If you understand functions. If not just put your code in OnTick()

OnTick(function (myHero)
  if Ready(_R) then
    for _, ally in pairs(GetAllyHeroes()) do
     if (GetCurrentHP(ally)/GetMaxHP(ally))<0.2 and  Ready(_R) and IsObjectAlive(ally) then
      CastSpell(_R)
    end
  end
end)

thanks you so much


  • 0

#4
Auxide

Auxide

    Advanced Member

  • Contributor
  • 295 posts

Welcome back! :)


  • 0

#5
Deftsu

Deftsu

    donthackourgames

  • Ex-Core Dev
  • PipPipPip
  • 4,812 posts

OnTick(function(myHero)
  if IsReady(_R) then
    for _, ally in pairs(GetAllyHeroes()) do
      if GetPercentHP(ally) < 20 then
      CastSpell(_R)
      end
    end
  end
end)

 

Clean Version


  • 0

#6
Lelouch

Lelouch

    ?

  • Members
  • 464 posts
OnTick(function(myHero)
  if IsReady(_R) then
    for _, ally in pairs(GetAllyHeroes()) do
      if GetPercentHP(ally) < 20 then
      CastSpell(_R)
      end
    end
  end
end)

Clean Version

 

IsObjectAlive(ally) not needed?


  • 0

#7
Deftsu

Deftsu

    donthackourgames

  • Ex-Core Dev
  • PipPipPip
  • 4,812 posts

IsObjectAlive(ally) not needed?


ValidTarget can work too
  • 0

#8
Inspired

Inspired

    Took the red pill.

  • Ex-Core Dev
  • PipPipPip
  • 723 posts
  • LocationWonderland
require("Inspired") -- only if you didnt already
OnTick(function(myHero)
  if IsReady(_R) then
    for _, ally in pairs(GetAllyHeroes()) do
      if GetPercentHP(ally) < 20 and not IsDead(ally) then -- you need alive check here, since a dead ally has 0% hp..
        CastSpell(_R)
      end
    end
  end
end)
:fappa:

ValidTarget checks for team aswell, means ally's are NEVER a valid target.
  • 0

#9
Deftsu

Deftsu

    donthackourgames

  • Ex-Core Dev
  • PipPipPip
  • 4,812 posts

require("Inspired") -- only if you didnt already
OnTick(function(myHero)
  if IsReady(_R) then
    for _, ally in pairs(GetAllyHeroes()) do
      if GetPercentHP(ally) < 20 and not IsDead(ally) then -- you need alive check here, since a dead ally has 0% hp..
        CastSpell(_R)
      end
    end
  end
end)
:fappa:ValidTarget checks for team aswell, means ally's are NEVER a valid target.

i didnt know :fappa:
  • 0

#10
ilovesona

ilovesona

    Sona's wife

  • Contributor
  • 1,096 posts

i didnt know :fappa:

:fappa:


  • 0

#11
ilovesona

ilovesona

    Sona's wife

  • Contributor
  • 1,096 posts
require("Inspired") -- only if you didnt already
OnTick(function(myHero)
  if IsReady(_R) then
    for _, ally in pairs(GetAllyHeroes()) do
      if GetPercentHP(ally) < 20 and not IsDead(ally) then -- you need alive check here, since a dead ally has 0% hp..
        CastSpell(_R)
      end
    end
  end
end)
:fappa:

ValidTarget checks for team aswell, means ally's are NEVER a valid target.

 

not just team check

 

targetable check will break it too...


  • 0

#12
Deftsu

Deftsu

    donthackourgames

  • Ex-Core Dev
  • PipPipPip
  • 4,812 posts

not just team check

 

targetable check will break it too...

we can even target ourselves actually xD try AttackUnit(myHero)


  • 0

#13
Lelouch

Lelouch

    ?

  • Members
  • 464 posts

ValidTarget can work too

We'll I thought the same until i made the Raka script Doge


  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users