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

Ravage Proc

Inrego

New Member
Joined
Feb 7, 2010
Messages
2,765
Reaction score
71
I'm trying to modify the default druid CC, and I've gotten it to use Feral Charge as pull, but I can't get it to use Ravage? When using Feral Charge (Cat), the Ravage icon turns into Ravage!
They have 2 different spell IDs, and if I use the original, it'll just say I need to be stealthed to use it, and if I use Ravage! nothing happens.
Code:
            #region combat casting

            if (AddsList.Count > 0)
            {
                // combat
                if (CombatChecks)
                {
                    if (ObjectManager.Me.Shapeshift != ShapeshiftForm.Cat)
                    {
                        Logging.Write("Combat: Need Cat form");
                        TakeForm(ShapeshiftForm.Cat);
                    }

                    if (SpellManager.HasSpell("Tiger's Fury") && !SpellManager.Spells["Tiger's Fury"].Cooldown)
                    {
                        TigersFury();
                    }

                    const uint bleedOnRunnersPercent = 55;

                    if (!GotTarget)
                    {
                        return;
                    }
                    else if (MyTarget.HealthPercent > 50 && SpellManager.HasSpell("Faerie Fire (Feral)") &&
                             !MyTarget.Auras.ContainsKey("Faerie Fire"))
                    {
                        FaerieFireFeral();
                    }
/// Can't get this to work. Spell ID for ravage: 6785 - Spell ID for Ravage! (proc): 81170
///                    else if (Me.Auras.ContainsKey("Stampede"))
///                    {
///                        Slog("Ravage on {0}.", MyTarget.Name);
///                        SpellManager.Cast("Ravage!");
///                    }
                    else if (RunnerList.Contains(MyTarget.Entry) && MyTarget.HealthPercent < bleedOnRunnersPercent && SpellManager.HasSpell("Rake") &&
                             !MyTarget.Auras.ContainsKey("Rake"))
                    {
                        Slog("Rake on {0}.", MyTarget.Name);
                        Rake();
                    }
                    else if (!RunnerList.Contains(MyTarget.Entry) && MyTarget.HealthPercent > 50 && SpellManager.HasSpell("Rake") &&
                             !MyTarget.Auras.ContainsKey("Rake"))
                    {
                        Rake();
                    }
                    else if (RunnerList.Contains(MyTarget.Entry) && MyTarget.HealthPercent < bleedOnRunnersPercent && SpellManager.HasSpell("Rip") &&
                             !MyTarget.Auras.ContainsKey("Rip"))
                    {
                        Slog("Rip on {0}.", MyTarget.Name);
                        Rip();
                    }
                    else if (!RunnerList.Contains(MyTarget.Entry) && Me.ComboPoints > 0 && Me.ComboPoints < 4 && MyTarget.HealthPercent > 50 && SpellManager.HasSpell("Rip") &&
                             !MyTarget.Auras.ContainsKey("Rip"))
                    {
                        Rip();
                    }
                    else if (SpellManager.HasSpell("Ferocious Bite") && (Me.ComboPoints >= KillComboCount || (MyTarget.HealthPercent < 30 && Me.ComboPoints > 2)))
                    {
                        FerociousBite();
                    }
                    else
                    {
                        MangleCat();
                    }
                }
            }
 
Could use something like this:

Code:
public static WoWSpell Ravage = WoWSpell.FromId(81170);

Then I think this will work:

Code:
else if (Me.Auras.ContainsKey("Stampede"))
{
    Slog("Ravage on {0}.", MyTarget.Name);
    SpellManager.Cast(Ravage);
}

if the SpellManager.Cast doesn't work with just Ravager, make a customer spellcast like this:

Code:
public bool CastSpell(WoWSpell m_spell)
{
	//if we are in the define range
	if (SpellManager.CanCast(m_spell))
	{
		SpellManager.Cast(m_spell);
		// We managed to cast the spell, so return true, saying we were able to cast it.
		slog(m_spell.Name);
		return true;
	}
	// Can't cast the spell right now, so return false.
	return false;
}

And then change the above to:

Code:
else if (Me.Auras.ContainsKey("Stampede"))
{
    CastSpell(Ravage);
}
 
Last edited:
I do believe you can cast spell my spell name rather than ID if that helps. So "Ravage" or "Ravage!" Rather than cast spell to a WoWSpell
 
I tried your first example but I can't figure where I'd place
Code:
public static WoWSpell Ravage = WoWSpell.FromId(81170);
I'm very new to programming, I'm in the middle of learning from a C# book, but I'm still a rookie. But more or less anywhere I put that line of code, I get compile errors.
In your second example, I don't see anywhere in the code that will make it cast Ravage! ?
 
You can use either
Code:
public static WoWSpell Ravage = WoWSpell.FromId(81170);
Ravage.Cast();
In the above case you need to declare Ravage outside of a procedure and call Ravage.Cast() inside one. Or even easier.....
Code:
 SpellManager.Cast("Ravage");
 
I did use
Code:
SpellManager.Cast("Ravage");
in the piece of code in my OP. So I'm not really sure where you're going?
 
I did use
Code:
SpellManager.Cast("Ravage");
in the piece of code in my OP. So I'm not really sure where you're going?

I'm going with if HB can find the spell Ravage it will cast it when the above is called, if the spell name changes to "Ravage!" you need to use that accordingly. If that doesn't work id put in some more checks before casting it to make sure you can. IE, can wow find the spell, are you on cooldown, are you curently casting, are you in range etc etc etc
 
Hmm.. Why would that be necessary? I know that it's available as long as I have the Stampede buff.
 
Hmm.. Why would that be necessary? I know that it's available as long as I have the Stampede buff.

Lots of reasons, I don't know your class but if your out of casting range, it can't cast it for example... If your spells are on a global cooldown then it cant be cast. I see your writing to the log before you cast, do you see the log write in the HB window?
EDIT:

When I was coding CC's I used this, and just called SafeCast("SpellName");
Code:
public bool SafeCast(string spellName)
        {
           
            if (!StyxWoW.IsInGame || !StyxWoW.IsInWorld ||_me.IsCasting || !SpellManager.HasSpell(spellName) || SpellManager.Spells[spellName].Cooldown)
            {
               
                return false;
               
            }
            if (SpellManager.HasSpell(spellName) && !StyxWoW.Me.IsCasting)
            {
                if (SpellManager.Spells[spellName].CastTime > 1)
                {
                    WoWMovement.MoveStop();
                    WoWMovement.Face();
                }
                try
                {
                    if (StyxWoW.Me.GotTarget && _me.CurrentTarget.Attackable)
                    {
                        WoWMovement.Face();
                    }
                }
                catch
                {
                    Logging.WriteDebug("No need to face target.");
                }
               
                SpellManager.Cast(spellName);
Thread.Sleep(Convert.ToInt32(SpellManager.Spells[spellName].CastTime));
                while (_me.IsCasting)
                {
                    Thread.Sleep(10);
                }
                while (StyxWoW.GlobalCooldown)
                {
                    Thread.Sleep(10);
                }
             
                return true;
            }
            Logging.WriteDebug("{0} can't cast {1}.", Name, spellName);
            return false;
        }
 
Last edited:
Yea, there is also safecast in this CC, but when I used that, it still didn't cast it.
I did peak in on another CCs code for this, and I saw someone commented that he did some kind of workaround to try to make it work because hb was bugged on this stuff
 
Ah, I don't think you've figured what I want (or how the ability works).
Feral Charge gives me a buff (Stampede) which removes the requirement to be in prowl and behind the target. Furthermore it also removes the energy cost of Ravage. When I get the buff "Stampede" my Ravage spell on the actionbar lights up and the tooltip name is now "Ravage!". I checked out wowhead and found that these 2 have different spell ID's. So I'm not trying to cast the ability that has prowl and placement requirements.
 
Ahh I see, I don't use Druids :p So
Code:
SpellManager.Cast("Ravage!");
Doesnt work? Try
Code:
SpellManager.Cast("Ravage!");
StyxWoW.SleepForLagDuration(); 
SpellManager.Cast("Ravage!");
 
Still nothing. It just does nothing until the Rampage buff is gone.
 
Back
Top