• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Spell.Stopcasting not working with Mind Flay?

    Discussion in 'Archives' started by handnavi, Jul 30, 2011.

    1. handnavi

      handnavi Well-Known Member Buddy Store Developer

      Joined:
      Jan 15, 2010
      Messages:
      2,489
      Likes Received:
      59
      Trophy Points:
      48
      Hey!

      I'm just writing a shadow priest.cc and i'm not able to interrupt my mind flay cast.

      Code:
      ....
                      SpellManager.Cast(spellName); //Mindflay
                      while (Me.IsCasting){     // This check seems not to work, i never reach the    logging underneath it, why? 
                          Logging.Write(Color.Lime, "Cancel Mindflay, need to dot!");
                      
                          if (TargetDebuffTimeLeft("Vampiric Touch") < 3)
                          {
                              SpellManager.StopCasting();
                              
                              Logging.Write(Color.Lime, "Cancel Mindflay, need to dot!111");
      
                           }
      }
      ...
      
      
      Is there any trick? :D
       
    2. me242

      me242 New Member

      Joined:
      Jun 8, 2010
      Messages:
      117
      Likes Received:
      0
      Trophy Points:
      0
      Found this one in singular

      Code:
                  // are we casting or channeling ?
                  if (Me.IsCasting || Me.ChanneledCastingSpellId != 0)
                  {
                      return false;
                  }
      
      Try Me.ChanneledCastingSpellId maybe?
       
    3. fiftypence

      fiftypence New Member

      Joined:
      Jul 28, 2011
      Messages:
      235
      Likes Received:
      13
      Trophy Points:
      0
      I think this should do the trick.

      Code:
                  if ((!Me.CurrentTarget.HasAura("Vampiric Touch")
                      || Me.CurrentTarget.Auras["Vampiric Touch"].TimeLeft.Seconds <= 3)
                      && SpellManager.CanCast("Vampiric Touch"))
                  {
                      SpellManager.StopCasting();
                      Thread.Sleep(50);
      
                      SpellManager.Cast("Vampiric Touch");
                  }
       
    4. handnavi

      handnavi Well-Known Member Buddy Store Developer

      Joined:
      Jan 15, 2010
      Messages:
      2,489
      Likes Received:
      59
      Trophy Points:
      48
      This hasnt worked for me either.
      Found a solution:
      Code:
      while (StyxWoW.Me.CurrentCastId != 0)
                      {
                          [B]ObjectManager.Update();[/B]
                          if (TargetDebuffTimeLeft("Vampiric Touch") < 3)  
                                {
                                SpellManager.StopCasting();
                                Thread.Sleep(50);
                                SpellManager.Cast("Vampiric Touch");
                                 } 
                       }
      
      
       

    Share This Page