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

I need help with GetCastCooldown()


  • Please log in to reply
3 replies to this topic

#1
francoiz

francoiz

    Newbie

  • Members
  • 3 posts

Hi, i am new user in the foro, sorry for my bad english  :(

 

I have a problem with the function GetCastCooldown()

I wrote this code to test:

local myHero = GetMyHero()

PrintChat("Cast cooldown: "..tostring(GetCastCooldown(myHero,_Q, GetCastLevel(myHero,_Q)))

 

I tested with different champions and differents spells, but this code always return the same results.

 

09cc550656ad3729ac86a74c2d41213b.png

 

I do not understand why  :unsure:
 
It should be noted that GetCastLevel works, i tested this. Also i tested with others spells as _E, _W, etc, but the same results.
 
On the other hand, GetCDR() works me, but i do not understand why GetCDR() returns the negative and divided by 100 result (for example, if i have 10% CDR then GetCDR() return -0.10...) 
 
Thank you for your attention, regards :P
 
(and sorry for my bad english x2)

  • 0

#2
altairirvv

altairirvv

    Newbie

  • Members
  • 7 posts

If GetCastCooldown() returns a very tiny number, maybe that's not what you're looking for.

 

Just say what you need and want to do, we can help better.

GetCDR() returns a negative and divided by 100 number because represents a percentage of the base Cooldown.

In the case you described -0.10 (-10%) means that if the base cooldown is 10 seconds, CDR will bring it down to 9 seconds, wich is 10% less of 10 seconds.


  • 0

#3
francoiz

francoiz

    Newbie

  • Members
  • 3 posts

If GetCastCooldown() returns a very tiny number, maybe that's not what you're looking for.

 

Just say what you need and want to do, we can help better.

GetCDR() returns a negative and divided by 100 number because represents a percentage of the base Cooldown.

In the case you described -0.10 (-10%) means that if the base cooldown is 10 seconds, CDR will bring it down to 9 seconds, wich is 10% less of 10 seconds.

Ahh, Thanks for your answer!

 

I want to get the cooldown of x skill for some champion (hero).
I thought that GetCastCooldown () returned the cooldowns of the skills. Sorry.

I can create a table with all the cooldowns of the skills, but if GetCastCooldown () works the way I thought, this would make my job a lot easier.

 
Sorry for my bad english! 

  • 0

#4
altairirvv

altairirvv

    Newbie

  • Members
  • 7 posts

 

Ahh, Thanks for your answer!

 

I want to get the cooldown of x skill for some champion (hero).
I thought that GetCastCooldown () returned the cooldowns of the skills. Sorry.

I can create a table with all the cooldowns of the skills, but if GetCastCooldown () works the way I thought, this would make my job a lot easier.

 
Sorry for my bad english! 

 

 

GetCastCooldown () might return CastCooldown, wich is not the same thing.

 

Look for GetSpellData().spellCd on Deftsu's topic.

Here's the link: http://gamingonstero...s-official-api/

 

I haven't tested it yet, but the code below should give you the Cooldown of the "Q" spell of "myHero".

GetSpellData(myHero, _Q).spellCd

  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users