Jump to content

Kick it (a solution for Rogue)


Bugreporter

Recommended Posts

Same usage of a LUA-Script as described
 
A (Combat) Rogue has at last 4 spells to interrupt spells: Kick, Blind, Gouge, Kidney Shot. Not all are usable in all situations, but all have the same conditions to try a try:

  •  
  • the target must not be friendly
  • its cast must be a interruptable spell
  • our spell must be ready to use
  • and the target must be in range.
  • (added) If the spell not interruptable, cast feint (and hope the best) Kick need a high priority, feint a low, so I removed it

with this information we could combine this 4 spells to one cast, which

  • make our fight class profile smaller,
  • make the settings clearer
  • gives a info of the spell, which is interrupted
  • allow us to do changes in the source once, not four times

Hint: With the talent "Dirty Tricks" the cost of blind and gouge are 0 energie (like Kick)


        <FightClassSpell>
      <SpellName>--Kick Spells</SpellName>
      <FightClassConditions>
        <FightClassCondition>
          <ContionType>LuaScript</ContionType>
          <Param xsi:type="FightClassConditionLua">
            <LuaScript>local kicked=0
if UnitExists("target") and not UnitIsFriend("player", "target") then
    local spell, rank, displayName, icon, startTime, endTime, isTradeSkill, castID, interrupt = UnitCastingInfo("target");
    if (interrupt==false) then
--[[                    (cheapest first)
                       Kick,Blind,Gouge, Kidney Shot
--]]                       
        local idSpells={1766,2094,1776,408}        
        local now=GetTime()
        for i=1, 4 do
            if (kicked==0) then
                local start, duration, enabled = GetSpellCooldown(idSpells[i])
                if (duration==0) then
                    local spellname=GetSpellInfo(idSpells[i])
                    if (IsSpellInRange(spellname, "target")==1) then
                        CastSpellByName(spellname)
                        kicked=idSpells[i]
                        print(spell.." kicked by "..spellname)
                    end
                end
            end
        end
    end
end
result=(kicked~=0)</LuaScript>
            <VarRet>result</VarRet>
            <ValueRet>true</ValueRet>
          </Param>
        </FightClassCondition>
      </FightClassConditions>
      <Priority>29</Priority>
      <CheckIfKnowUsableDistance>false</CheckIfKnowUsableDistance>
      <AddToSettings>true</AddToSettings>
      <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
      <DescriptionSpell>Kick &gt; Gouge &gt; Kidney Shot for interruptable spells</DescriptionSpell>
    </FightClassSpell>


based on WoW 5.4.2.

 

Link to comment
Share on other sites

  • 2 weeks later...

Added:

cast Feint, if spell not interruptable

    --[[ Feint added...If you don't want to use it, remove here ---> ]]
    if (kicked==0) and (spell) then
        --[[ not kickable or no free spells? let's do feint and hope the best. ]]
        idFeint=1966
        local spellname=GetSpellInfo(idFeint)
        local start, duration, enabled = GetSpellCooldown(idFeint)
        if (duration==0) then
            CastSpellByName(spellname)
            kicked=idFeint
        end
    end
    --[[ ---> to here ]]

Link to comment
Share on other sites

  • 2 weeks later...

Maybe its a good idea to add an additional "If" after "If UnitExist...". The condition below test , if the target is a player and if wait up to 50% percent of the casting spell before kick. On NPC it kicks instant

 

Reasons:

 

  a /cast; /stopcasting; /cast again; wouldn't work for the target, because we wait, if he really cast. :-)

  a too fast kick could be identify as kickbot. And we don't bot !!!... or?

 

(not testet yet)
 

if (not (UnitIsPlayer("target") and UnitIsPVP("target")) ) or (((GetTime()-startTime)*100/(endTime-startTime)) > 50) then

...kickit here...

end

It could be, that we miss some kickes because but thats okay, I thing.

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