Jump to content

Combo Points instant (a solution)


Bugreporter

Recommended Posts

At first: The talent "Marked for Death" is needed to use the spell "Marked for Death". Without them, only the Redirect spell will be used.

 

1. Check if there are any combopoints around there, but not on the target. In this case we use Redirect if possible.

2. If Redirect is not usable, then we use "Marked for Death". which give us 5 CP instant. (accept Shadow Blades is active.)

    <FightClassSpell>
      <SpellName>--combopoints instant</SpellName>
      <FightClassConditions>
        <FightClassCondition>
          <ContionType>LuaScript</ContionType>
          <Param xsi:type="FightClassConditionLua">
            <LuaScript>result=""
local spell="nothing"
if UnitExists("target") and not UnitIsFriend("player", "target") and (GetComboPoints("player")==0) then 
	idRecuperate=73651
	local spellname=GetSpellInfo(idRecuperate)

	--[[ No CP and Recuperate ready? Then we have CP nearby ! ]]
	local usable,noCP=IsUsableSpell(spellname)
	if (usable) then
		local idRedirect=73981
		local start, duration, enabled = GetSpellCooldown(idRedirect)
		--[[ redirect ready ?]]
		if (duration==0) then
			local spellname=GetSpellInfo(idRedirect)
			if (IsSpellInRange(spellname, "target")==1) then
				spell=spellname
			end
		end
	end
	if (spell=="nothing") then
		local idMarkDeath=137619
		local idShadowBlades=121471
		local SBname=GetSpellInfo(idShadowBlades)

		local start, duration, enabled = GetSpellCooldown(idMarkDeath)
		--[[ Marked for Death ready ?]]
		
		if (duration==0) and not (SBname==UnitBuff("player",SBname)) then
			local spellname=GetSpellInfo(idMarkDeath)
			local usable,noCP=IsUsableSpell(spellname)
			if (IsSpellInRange(spellname, "target")==1) and (usable) then
				spell=spellname
			end
		end
	end
	if not (spell=="nothing") then 
		CastSpellByName(spell)
		print("cp : "..spell)
		result=true
	end
end;	
</LuaScript>
            <VarRet>result</VarRet>
            <ValueRet>true</ValueRet>
          </Param>
        </FightClassCondition>
      </FightClassConditions>
      <Priority>30</Priority>
      <CombatOnly>false</CombatOnly>
      <CheckIfKnowUsableDistance>false</CheckIfKnowUsableDistance>
      <CheckIfView>false</CheckIfView>
      <AddToSettings>true</AddToSettings>
      <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
    </FightClassSpell>

based on WoW 5.4.2.

 

Link to comment
Share on other sites

Nevermind, changed it myself to: -

    <FightClassSpell>
      <SpellName>--combopoints instant</SpellName>
      <FightClassConditions>
        <FightClassCondition>
          <ContionType>LuaScript</ContionType>
          <Param xsi:type="FightClassConditionLua">
            <LuaScript>result=""
local spell="nothing"
if UnitExists("target") and not UnitIsFriend("player", "target") and (GetComboPoints("player")==0) then 
	idRecuperate=73651
	local spellname=GetSpellInfo(idRecuperate)

	--[[ No CP and Recuperate ready? Then we have CP nearby ! ]]
	local usable,noCP=IsUsableSpell(spellname)
	if (usable) then
		local idRedirect=73981
		local start, duration, enabled = GetSpellCooldown(idRedirect)
		--[[ redirect ready ?]]
		if (duration==0) then
			local spellname=GetSpellInfo(idRedirect)
			if (IsSpellInRange(spellname, "target")==1) then
				spell=spellname
			end
		end
	end
	if not (spell=="nothing") then 
		CastSpellByName(spell)
		print("cp : "..spell)
		result=true
	end
end;	
</LuaScript>
            <VarRet>result</VarRet>
            <ValueRet>true</ValueRet>
          </Param>
        </FightClassCondition>
      </FightClassConditions>
      <Priority>30</Priority>
      <CombatOnly>false</CombatOnly>
      <CheckIfKnowUsableDistance>false</CheckIfKnowUsableDistance>
      <CheckIfView>false</CheckIfView>
      <AddToSettings>true</AddToSettings>
      <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
    </FightClassSpell>

Just removing the Marked for Death code. So far the redirects are working well without and pauses or rotation stops.

 

Awesome. I'll keep testing it.

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...