What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

Proper way to not break channeled spells?

ski

Well-Known Member
Joined
Feb 12, 2010
Messages
3,720
Reaction score
48
Is there a method to not break channeled spells that actually works? I've tried using Me.Casting and Me.ChannelCasting > 0 in while loops and returns, but it never works.

My current method (that should work for all intents and purposes) is below:

Code:
            if (Me.IsCasting || Me.ChanneledCasting > 0)
            {
                return;
            }

Its in my combat() before any of my spell decisions are made, and I cast one spell per run through of combat(), so it should get hit after every cast and before the next spell is cast, effectively making it so that the CC will not try to cast a spell if it is currently casting or channeling, but it doesn't work.
 
Here is the one I use. It works.

Code:
public void WaitWhileCasting()
{
Thread.Sleep(250);
while (Me.Casting != 0 || Me.ChanneledCasting != 0)
{
Thread.Sleep(100);
}
}

 
Here is the one I use. It works.

Code:
public void WaitWhileCasting()
{
Thread.Sleep(250);
while (Me.Casting != 0 || Me.ChanneledCasting != 0)
{
Thread.Sleep(100);
}
}


I've tried this too, I'll try it again. Object explorer says that Me.Casting returns the spellid of the spell being cast, so I didn't know if it could be used to detect any casting.
 
Forgive me for necroing an old thread but where would this go in the cs file? I'm trying to fix Khryses' priest profile so it doesn't break mindflay after one tick. I've tried it in a few different places in the CC but after I save the file, the CC won't load.

Is it because I'm making the changes in NotePad? Or is it because I'm just putting it in the wrong place? I tried putting it after the public override void Combat() statement as well as after the private void Cast() statements (making sure I didn't put them inside of the other statements) but nothing worked (as in the CC wouldn't load). Any ideas?

EDIT: NVM, fixed it. It's working now.
 
Last edited:
Back
Top