What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

SpellManager.GlobalCooldown and SpellManager.CastBarVisible working?

ski

Well-Known Member
Joined
Feb 12, 2010
Messages
3,720
I used to use (while Me.Casting > 0){Thread.Sleep(100);} during my spell casts to try and sleep the CC while it was casting (so it wasn't just spamming the log with spellcasts), only I just realized that that statement doesn't actually do anything. Me.Casting is a check to see the int of the spell your casting, and not a value of (Am I casting?).

So I found SpellManager.GlobalCooldown and SpellManager.CastBarVisible, which are both bools that should return true if the GCD is active or my cast bar is showing (aka, if I'm casting). Unfortunately, neither seem to work.

I've tried this code:
Code:
        if (SpellManager.CastSpell("Immolate", false)) {
            slog("Spells: Casting Immolate.");
            while (SpellManager.GlobalCooldown == true || SpellManager.CastBarVisible == true){
            Thread.Sleep(averageLag);
                slog("Debug: sleeping 100");
            }
            return true;

But it never enters the while() loop. It will cast Immolate 100 times, but never sleep or report the debug message to the log. Does anyone know if either of these actually work?
 
try this:

SpellManager.CastSpell("Immolate", false); change to SpellManager.CastSpell("Immolate", true);

Bool Description
"Whether to wait until the spell has finished casting, or return immediately after it has started casting "


But I don't know why you wanna sleep the proces. If I have the bool on false it just work for me...?
 
try this:

SpellManager.CastSpell("Immolate", false); change to SpellManager.CastSpell("Immolate", true);

Bool Description
"Whether to wait until the spell has finished casting, or return immediately after it has started casting "


But I don't know why you wanna sleep the proces. If I have the bool on false it just work for me...?

My CC is casting so fast that its double casting. If my CC casts an Immolate, it will run through the conditions (particular if the target has Immolate on it) before the buff actually shows up and end up casting again.
 
try this:

SpellManager.CastSpell("Immolate", false); change to SpellManager.CastSpell("Immolate", true);

Bool Description
"Whether to wait until the spell has finished casting, or return immediately after it has started casting "


But I don't know why you wanna sleep the proces. If I have the bool on false it just work for me...?

Also, setting this to true would be counterintuitive. The second bool is "returnImmediately", I have it set to false, setting it to true would make it worse.
 
hmm ok *I'm new to HB, gonna try to learn it;) * But If you setting it true won't it coming in the while because you get immediately your return cast so he will see that your are casting it, Now its just return if immonlate is already casted so there won't be a global cooldown or casting immulate. Just say If I seeing it wrong?
 
hmm ok *I'm new to HB, gonna try to learn it;) * But If you setting it true won't it coming in the while because you get immediately your return cast so he will see that your are casting it, Now its just return if immonlate is already casted so there won't be a global cooldown or casting immulate. Just say If I seeing it wrong?

I'll try it and see what happens
 
I used to use (while Me.Casting > 0){Thread.Sleep(100);} during my spell casts to try and sleep the CC while it was casting (so it wasn't just spamming the log with spellcasts), only I just realized that that statement doesn't actually do anything. Me.Casting is a check to see the int of the spell your casting, and not a value of (Am I casting?).

So I found SpellManager.GlobalCooldown and SpellManager.CastBarVisible, which are both bools that should return true if the GCD is active or my cast bar is showing (aka, if I'm casting). Unfortunately, neither seem to work.

I've tried this code:
Code:
        if (SpellManager.CastSpell("Immolate", false)) {
            slog("Spells: Casting Immolate.");
            while (SpellManager.GlobalCooldown == true || SpellManager.CastBarVisible == true){
            Thread.Sleep(averageLag);
                slog("Debug: sleeping 100");
            }
            return true;
But it never enters the while() loop. It will cast Immolate 100 times, but never sleep or report the debug message to the log. Does anyone know if either of these actually work?

well adding a while (Me.IsCasting) works for me, the problem is when it comes it interupting the casting to do things like a conterspell or pull a heal.

heres the code im using, for example when casting a pyroblast. it works for me.
Code:
                while (Me.IsCasting)
                {
                    Thread.Sleep(100);
                }
 
Huh, not sure why I didn't see that before. Let's see if it works.
 
well adding a while (Me.IsCasting) works for me, the problem is when it comes it interupting the casting to do things like a conterspell or pull a heal.

heres the code im using, for example when casting a pyroblast. it works for me.
Code:
                while (Me.IsCasting)
                {
                    Thread.Sleep(100);
                }

Not sure of the naming conventions you guys use but perhaps:

Code:
while (MY_HEALTH > 25% && Me.IsCasting && !TARGETCASTINGSPELL)
{
	Thread.Sleep(100);
}

Just a shot in the dark
 
Back
Top