Jump to content

How cast Sidewinders before reach 2 stacks


Drwolftech

Recommended Posts

2 hours ago, Droidz said:

Dont work, because it checks the buff on your character, not the stack of the skill on your skill bar.

Link to comment
Share on other sites

GetSpellCharges do, what you want. Its not difficult to check if there are 2 charges. But it could very difficult to check, if you used one before (and want now used the second one). With my Sub-Rogue i can check a buff (31223) which exist 5 sec's longer then shadowdance (185313). (but only if a special talent used)

 

local spellname=GetSpellInfo(36554)  --[[ Shadowstep ]]
if UnitExists("target") and not UnitIsFriend("player", "target") and (IsSpellInRange(spellname,"target")==1) and (UnitHealth("target")>1) then
	local currentCharges, maxCharges, cooldownStart, cooldownDuration = GetSpellCharges(185313)
	local now=GetTime();
	if (currentCharges>=2) or ((UnitBuff("player",GetSpellInfo(31223))~=nil) and (currentCharges~=0)) then
		result=true
		--[[ Stealth, Shadow Dance or Subterfuge ]]
		if IsStealthed() or (UnitBuff("player",GetSpellInfo(185313))~=nil) or (UnitBuff("player",GetSpellInfo(108208))~=nil) then
			result=false
		end
	end
end

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...