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

Cast spells twice in CC's

Nightskine

Member
Joined
Oct 30, 2010
Messages
150
Reaction score
1
Hey guys,
I'm having trouble with this hunter CC for the Marksman spec.
I'm trying to keep the Improved Steady Shot buff up by casting Steady Shot twice in a row.
However what I have in the coding for that just doesn't seem to be working

Code:
if (!Me.HasAura("Improved Steady Shot"))
	{
	SpellManager.Cast("Steady Shot");
	Thread.Sleep(2*1000);
	SpellManager.Cast("Steady Shot");
	}

On a related note - what does Thread.Sleep() do? I am under the impression that it pauses the CC for the miliseconds listed in the ().
Or does it only tell HB not to look into that particular if() thread for that time?

Thanks for all the help in the past guys - You've all helped me make lazyraider CC's for all the classes I play - feels great using something you've made yourself!
 
Hey guys,
I'm having trouble with this hunter CC for the Marksman spec.
I'm trying to keep the Improved Steady Shot buff up by casting Steady Shot twice in a row.
However what I have in the coding for that just doesn't seem to be working

Code:
if (!Me.HasAura("Improved Steady Shot"))
	{
	SpellManager.Cast("Steady Shot");
	Thread.Sleep(2*1000);
	SpellManager.Cast("Steady Shot");
	}

On a related note - what does Thread.Sleep() do? I am under the impression that it pauses the CC for the miliseconds listed in the ().
Or does it only tell HB not to look into that particular if() thread for that time?

Thanks for all the help in the past guys - You've all helped me make lazyraider CC's for all the classes I play - feels great using something you've made yourself!

How about this? it will use steady shot till it has aura, and will shoot once every 1,75 seconds, remember wow has a global cooldown at 1,5 seconds, and 0,250 seconds needed for lag.
Thread.Sleep(1750); = do not use this spell more often simplified

Edit: that should work... i think. i am not a god when it comes to programming.

Code:
if (!Me.Auras.ContainsKey("Improved Steady Shot"))
	{
	SpellManager.Cast("Steady Shot");
	Thread.Sleep(1750);
	}
 
Last edited:
Hey guys,
I'm having trouble with this hunter CC for the Marksman spec.
I'm trying to keep the Improved Steady Shot buff up by casting Steady Shot twice in a row.
However what I have in the coding for that just doesn't seem to be working

Code:
if (!Me.HasAura("Improved Steady Shot"))
	{
	SpellManager.Cast("Steady Shot");
	Thread.Sleep(2*1000);
	SpellManager.Cast("Steady Shot");
	}

On a related note - what does Thread.Sleep() do? I am under the impression that it pauses the CC for the miliseconds listed in the ().
Or does it only tell HB not to look into that particular if() thread for that time?

Thanks for all the help in the past guys - You've all helped me make lazyraider CC's for all the classes I play - feels great using something you've made yourself!
Thread Sleep, locks the thread, so all of honorbuddy cant do anything while the thread is locked that includes your cc, and should be avoided when possible.

as far as the code there, it should cast steady shot again when the buff fades. there should be no need to "Double cast" the spell.
 
How about this? it will use steady shot till it has aura, and will shoot once every 1,75 seconds, remember wow has a global cooldown at 1,5 seconds, and 0,250 seconds needed for lag.
Thread.Sleep(1750); = do not use this spell more often simplified

Code:
if (!Me.HasAura("Improved Steady Shot"))
	{
	SpellManager.Cast("Steady Shot");
	Thread.Sleep(1750);
	}
yea thats not right.

if you wanna sleep, just do
StyxWoW.SleepForLagDuration();
you should never have a sleep for more then 500 since like i said it locks everything up.

i think the code you want is this.
if (!Me.HasAura("Improved Steady Shot") || (Me.HasAura("Improved Steady Shot") && Me.ActiveAuras["Improved Steady Shot"].TimeLeft <= TimeSpan.FromSeconds(3)))
{
SpellManager.Cast("Steady Shot");
}
 
I didn't know this - So HB will continue to cast the spell until the Aura is present?
I thought it would do it once and then continue to the next step and on the next run through do it again.
What I need is for HB to cast it twice in a row for the ISS buff without casting anything in between.
I'll try this tonight when I get home from work- thanks G...
 
I didn't know this - So HB will continue to cast the spell until the Aura is present?
I thought it would do it once and then continue to the next step and on the next run through do it again.
What I need is for HB to cast it twice in a row for the ISS buff without casting anything in between.
I'll try this tonight when I get home from work- thanks G...
you already have Improved Steady Shot up. why do you need to cast it again?

basicly what that if statement says,
if i dont have improved steady shot, or i have improved steady shot but the time left on it is less then 3 seconds.
then cast steadyshot.

this will keep the aura on you at all times instead of just reapplying it once it drops off.
 
I didn't know this - So HB will continue to cast the spell until the Aura is present?
I thought it would do it once and then continue to the next step and on the next run through do it again.
What I need is for HB to cast it twice in a row for the ISS buff without casting anything in between.
I'll try this tonight when I get home from work- thanks G...

what is the diference betwean:
StyxWoW.SleepForLagDuration();
and
Thread.Sleep(); ?

As i noticed that healing classes might heal them self 2 times when only one is needed if you don?t sleep, why this is i don?t know.

As i thought sleep, with any of the abowe functions was to not get your heal for example aborted, if a heal is 3 sec long you don?t want it do do anything else for 3 seconds? so is StyxWoW.SleepForLagDuration(); better even then?
 
Last edited:
what is the diference betwean:
StyxWoW.SleepForLagDuration();
and
Thread.Sleep(); ?

As i noticed that healing classes might heal them self 2 times when only one is needed if you don?t sleep, why this is i don?t know.

As i thought sleep, with any of the abowe functions was to not get your heal for example aborted, if a heal is 3 sec long you don?t want it do do anything else for 3 seconds? so is StyxWoW.SleepForLagDuration(); better even then?
StyxWoW.SleepForLagDuration(); does exactly what it says, sleeps for the lag duration. for example the lag between casting an AoE Spell and the Circle showing up. unless your doing things like specifily waiting something out, a Manual thread.sleep shouldnt be done, and even so, if you are sleeping the thread for large amounts of time, then maybe you need to change your coding style to make it so your not constantly locking up the thread.
 
Ok so I know two things for sure now - one: I am a bonafied idiot.
two: I am a bonafied idiot.

Ok so I haven't been able to test this since I have a troublesome trap launcher section above this that HB's getting stuck on - so it never reached here.

But I still feel like there's some misunderstanding here G ... in order to get the buff we need to cast steady shot twice in a row - without any other spells in between.
Before I put the TL code in what HB did was cast stady shot once - then go through the rest of the code like casting arcane shot as a focus dump - and then cast a second steady shot since we didnt have the buff. Is there a special code to tell HB to cast the same spell twice?
 
Last edited:
Back
Top