Jump to content

Bugreporter

WRobot user
  • Posts

    438
  • Joined

  • Last visited

Posts posted by Bugreporter

  1. Today I proudly presents : /use 10, use /13 aaaaand use /14 !!!
     
    Okay, RunMacroText("/use 14") will work also, so why should you use a script ?

    • I want to use "use 10" if it's ready to use
    • I want it in fight only
    • I dont want to change timers

    At first: If you are not rogue, ...

    • ... change idSinisterStrike=1752 to another spell that represents your fight range. I use it only to be sure, that I am near enough to fight. Sinister Strike are a level 1 spell with a range of 5y.
    • ... remove / change GetComboPoints to another check to be sure, you have the right target and you are in combat

    What do I do?
    At first I check if I am not in stealth, I have a target, the target is a bad guy, the fight has started and the range for a fight is good.
    After this I check my slots, if there are usable items in 10,13 or 14. If they are ready to use, I will use it.
     
    I made 3 sections (spells), because I want to be able to disable them once by once. Its also possible to make a loop to check/cast them once.
     
    /use 14

        <FightClassSpell>
          <SpellName>--use 14 (second trinket)</SpellName>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>LuaScript</ContionType>
              <Param xsi:type="FightClassConditionLua">
                <LuaScript>
    			local slot="Trinket1Slot"
    			local idSinisterStrike=1752
    			local ssname=GetSpellInfo(idSinisterStrike)
    			if not IsStealthed() and UnitExists("target") and not UnitIsFriend("player", "target") and (GetComboPoints("player") &gt; 0) and (UnitHealth("target")&gt;0) and (IsSpellInRange(ssname,"target")==1) then
    --[[			RunMacroText("/use 14")  ]]
    				local slotId, texture, checkRelic = GetInventorySlotInfo(slot)
    				local itemId = GetInventoryItemID("player", slotId)
    				local start, duration, enable = GetItemCooldown(itemId)
    				if (duration==0) then
    					UseInventoryItem( slotId );
    --[[ print("use "..slotId)	]]					
    					result=true
    				end
    			end
    			</LuaScript>
                <VarRet>result</VarRet>
                <ValueRet>true</ValueRet>
              </Param>
            </FightClassCondition>
          </FightClassConditions>
          <Priority>4</Priority>
          <CheckIfKnowUsableDistance>false</CheckIfKnowUsableDistance>
          <AddToSettings>true</AddToSettings>
          <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
          <DescriptionSpell>/use 14</DescriptionSpell>
        </FightClassSpell>
    

    /use 13




        <FightClassSpell>
          <SpellName>--use 13 (first trinket)</SpellName>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>LuaScript</ContionType>
              <Param xsi:type="FightClassConditionLua">
                <LuaScript>
    			local slot="Trinket0Slot"
    			local idSinisterStrike=1752
    			local ssname=GetSpellInfo(idSinisterStrike)
    			if not IsStealthed() and UnitExists("target") and not UnitIsFriend("player", "target") and (GetComboPoints("player") &gt; 0) and (UnitHealth("target")&gt;0) and (IsSpellInRange(ssname,"target")==1) then
    --[[			RunMacroText("/use 13")  ]]
    				local slotId, texture, checkRelic = GetInventorySlotInfo(slot)
    				local itemId = GetInventoryItemID("player", slotId)
    				local start, duration, enable = GetItemCooldown(itemId)
    				if (duration==0) then
    					UseInventoryItem( slotId );
    --[[ print("use "..slotId)	]]					
    					result=true
    				end
    			end
    			</LuaScript>
                <VarRet>result</VarRet>
                <ValueRet>true</ValueRet>
              </Param>
            </FightClassCondition>
          </FightClassConditions>
          <Priority>3</Priority>
          <CheckIfKnowUsableDistance>false</CheckIfKnowUsableDistance>
          <AddToSettings>true</AddToSettings>
          <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
          <DescriptionSpell>/use 13</DescriptionSpell>
        </FightClassSpell>
    

    /use 10




        <FightClassSpell>
          <SpellName>--use 10 (Engineer Gloves)</SpellName>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>LuaScript</ContionType>
              <Param xsi:type="FightClassConditionLua">
                <LuaScript>
    			local slot="HandsSlot"
    			local idSinisterStrike=1752
    			local ssname=GetSpellInfo(idSinisterStrike)
    			if not IsStealthed() and UnitExists("target") and not UnitIsFriend("player", "target") and (GetComboPoints("player") &gt; 0) and (UnitHealth("target")&gt;0) and (IsSpellInRange(ssname,"target")==1) then
    --[[			RunMacroText("/use 10")  ]]
    				local slotId, texture, checkRelic = GetInventorySlotInfo(slot)
    				local itemId = GetInventoryItemID("player", slotId)
    				local start, duration, enable = GetItemCooldown(itemId)
    				if (duration==0) then
    					UseInventoryItem( slotId );
    --[[ print("use "..slotId) ]]						
    					result=true
    				end
    			end
    			</LuaScript>
                <VarRet>result</VarRet>
                <ValueRet>true</ValueRet>
              </Param>
            </FightClassCondition>
          </FightClassConditions>
          <Priority>2</Priority>
          <CheckIfKnowUsableDistance>false</CheckIfKnowUsableDistance>
          <AddToSettings>true</AddToSettings>
          <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
          <DescriptionSpell>/use 10 (good Engineers only)</DescriptionSpell>
        </FightClassSpell>
    

    based on WoW 5.4.2.

     

  2. 1-16 because after this, the most boters go into ini's to lvl up.

     

    Quest profiles have a "best-before" date. Best before the next update, and after this Blizzard has changed something. And it isn't posible to support quest profiles 1-90 because you have to lvl up every time a new char to check all quests.

  3. I have learned that casting is not equal casting. There are channeling spells (spells that works the whole time while channeling i.e heal) and spells that works after a channeling time (i.e. poisons)

     

    Because of this I changed the code above from

    if not (UnitCastingInfo("player"))...
    
    to

    if (GetUnitSpeed("player") == 0) and not (UnitCastingInfo("player")) and not (UnitChannelInfo("player"))...
    
    I have add movedetection ( GetUnitSpeed("player") ) also.
  4. By default, this solution cast a lethal and a non-lethal poison, depending of the knowledge and the priority-list (idPoisons[1]=lethal, [2]=non-lethal).  If there is already a poison, and the run time of the poison will be less then 13  min, it will be renewed, if we are 

    • not in combat. (We need it before)
    • not AFK (who want casting while afk ?!?)
    • not Falling, Flying or Riding (mounted) (flying + casting = falling)
    • not casting

    Why 13 Minutes ? Because of the duration time of a fight with a raid boss. You want more or less ? Change  the 13 in  local timeLeftToCastAgain = 13*60 to another value.

        <FightClassSpell>
          <SpellName>--Poison Managment</SpellName>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>LuaScript</ContionType>
              <Param xsi:type="FightClassConditionLua">
                <LuaScript>
    if (GetUnitSpeed("player") == 0) and not (UnitCastingInfo("player")) and not (UnitChannelInfo("player")) and not (UnitAffectingCombat("player")) and not (IsMounted())  and not (IsFlying())  and not (IsFalling())  and not (IsResting())  and not (UnitIsAFK("player")) then
    
    	--[[ refresh the Poisons if there are less then 13 min left (to be sure that it dont runs out while a raid boss fight ]]
    	local timeLeftToCastAgain = 13*60;
    	local idPoisons={}
    --[[             Deadly,Wound ]]
    	idPoisons[1]={2823,8679}
    --[[             Leeching,Crippling,Mind-Numbing,Paralytic ]]
    	idPoisons[2]={108211,3408,5761,108215}
    	local now=GetTime();
    	for i=1,#idPoisons do
    		local spell="";
    		local PoisonFound=0
    		for j=1,#idPoisons[i] do
    			spellname=GetSpellInfo(idPoisons[i][j])
    			local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitBuff("player",spellname); 
    			if (name==spellname) then
    				local expireTimeLeft = expirationTime-now;
    				PoisonFound=idPoisons[i][j]
    				if (expireTimeLeft &lt; timeLeftToCastAgain) then
    					if (IsUsableSpell(spellname)) then
    						local start, duration, enable = GetSpellCooldown(spellname)
    						if (duration==0) then 
    							CastSpellByName(spellname);
    							spell=spellname;
    						end
    					end
    					
    				end
    				break;
    			end
    		end
    		if (PoisonFound==0) then
    			for j=1,#idPoisons[i] do
    				local spellname=GetSpellInfo(idPoisons[i][j])
    				if (IsUsableSpell(spellname)) then
    					local start, duration, enable = GetSpellCooldown(spellname)
    					if (duration==0) then 
    						CastSpellByName(spellname);
    						spell=spellname;
    						break;
    					end
    				end
    			end
    		end 
    		if not (spell=="") then
    			print("Poison: "..spell)
    			result=true
    			break;
    		end
    		
    	end
    end
    
    </LuaScript>
                <VarRet>result</VarRet>
                <ValueRet>true</ValueRet>
              </Param>
            </FightClassCondition>
          </FightClassConditions>
          <Priority>1</Priority>
          <CombatOnly>false</CombatOnly>
          <CheckIfKnowUsableDistance>false</CheckIfKnowUsableDistance>
          <CheckIfView>false</CheckIfView>
          <AddToSettingsActiveByDefault>true</AddToSettingsActiveByDefault>
          <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
          <CanMoveDuringCast>No</CanMoveDuringCast>
          <DescriptionSpell>Poison Managment</DescriptionSpell>
        </FightClassSpell>
    
    

    based on WoW 5.4.2.

     

  5. The "Combat" detection isn't usefull in all cases. Because of this I select a target in Raids only if i am sure that the fight has startet (or the pullcountdown will be 0). And I wait for the first CP to start the buffs, debuffs etc to be sure, that I am in fight to. It lose (very little) DPS, but I am sure, that I dont pull the boss or that my buffs are running out without an impact

  6. Sorry, my profiles are not rotation based, they work with the given situations, based on a priority list. In this case I never check energy, because it's never nessessary. If a spell is usable, and all given conditions are given, I use it. There is maybe a spell with more dps, but this spell is not ready in this moment or a condition is not set, or the priority is lower. And waiting in a fight is never a good idea.

     

     

    You will never get the perfekt profile or fights. There are so many buffs, that will modify our spells and/or dps and/or energy .

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

     

  8. 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 ]]
    
    
  9. More like this. 

     

    1. Did I have a focus and is it friendly

    2. have my focus a target and have this target less health then max (combat has started)

    2a. (added) and the target of my focus isn't friendly

    3. is my focus in range

    4. target focus, cast spell, target my target again.

    if UnitExists("focus") and UnitIsFriend("player", "focus") then 
    	local idTotT=57934
    	local spellname=GetSpellInfo(idTotT)
    	if (UnitExists("focustarget") and not UnitIsFriend("focus", "focustarget") and (UnitHealth("focustarget") ~= UnitHealthMax("focustarget")) and (UnitHealth("focustarget")>0) ) then
    		if (IsSpellInRange(spellname, "focus")==1)then
    			TargetUnit("focus")
    			CastSpellByName(spellname)
    			TargetUnit("playertarget")
    		end
    	end
    end
    
  10. Super.

     

    Could I also add an 'lua script' to that simple focus solution? I was thinking soemthing like this based on your tank one: -

    local idTotT=57934
    local spellname=GetSpellInfo(idTotT)
    	if (IsSpellInRange(spellname, "focus")==1)then
    	CastSpellByName(spellname)
    	end
    end
    

    Basically I just want a range check on it. Is that correct or am I missing something?

     

    CastSpellByName work only on a target, so you have to switch the target bevor and after the spell (see my code above). And you should check if your focus target is friendly :-) and if you are in combat. Casting while runing only through the ini whouldnt be help. Best time to cast is after the start of a combat and the focus has a target. (because without a target he dont make DPS.)

  11. And here is a very simple solution that use the focus target as target. If you dont use a english WoW  Version you have to change "Tricks of the Trades" into your language spell

        <FightClassSpell>
          <SpellName>RunMacroText("/cast [combat][@focus] Tricks of the Trades")</SpellName>
          <FightClassConditions />
          <Priority>1</Priority>
          <CheckIfKnowUsableDistance>false</CheckIfKnowUsableDistance>
          <CheckIfView>false</CheckIfView>
          <Timer>30000</Timer>
          <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
          <DescriptionSpell>Simplest solution. You need someone in Focus</DescriptionSpell>
        </FightClassSpell>
    
    
  12. This is the PvE code (without PvP) . untestet. just a proof of concept. Tank will be the target

    if UnitExists("target") and not UnitIsFriend("player", "target") then 
    	local idTotT=57934
    	local spellname=GetSpellInfo(idTotT)
    	if (UnitClassification("target")=="worldboss")) then
    		if not (UnitIsUnit("targettarget","player")) then
    			if (IsSpellInRange(spellname, "targettarget")==1)then
    				TargetUnit("targettarget")
    				CastSpellByName(spellname)
    				TargetUnit("playertarget")
    			end
    		end
    	else
    		if (UnitGroupRolesAssigned("targettarget")=="TANK") then
    			if (IsSpellInRange(spellname, "targettarget")==1)then
    				TargetUnit("targettarget")
    				CastSpellByName(spellname)
    				TargetUnit("playertarget")
    			end
    		end
    	end
    end
    
  13. Focus target work, if you use your macro and if you have selected the focus before, but the challange is to select the TotT-target by script.

     

    A solution could be (simple to code)

     

    if not pvp then

      if target == worldboss (all bosses with skulls are worldbosses) then

        if targettarget != me then

          cast TotT on targettarget.

        end

      else

        if targettarget == tank then

         cast TotT on targettarget

       end

      end

    else

      find a member that is not a healer:  

      cast TotD on member

    end

     

    This should work and will give the Tank the aggro in the most cases. in PvP you will get the first nonHealer.

     

    But... is TotT against Tanks really useful at the moment ? They didn't have a aggro problem and rogue are also most aggro-free (a vanish would help, if not). And 15% more damage for a single person in a 25 raid for 6 sec every 30 sec are less then 0,12 % for the raid.

     

    15/(30/6) = 3% for a single person

    3 / 25 ... 0,12% for the raid.

     

    and this only, if we dont have the TotT Glyphe.

     

    bzw. is TotT stackable? Means, if a tank has already TotT from another rogue is our TotT helpful ?

     

    And at last: Did someone ever heared that a tank said :" Where is my TotT ?"

  14. The problem is not Tricks of the Trades. The problem is to find the right target. Do you want TotT of the tank ? Or on another rogue? (without Glyphe TotT) and than maybe mutualy?

     

    And if there are more tanks in the raid: Which tank should get TotT? The Boss-tank or the Adds-tank? And if they both tank the boss (spotting), how do the script select the right tank ?

     

    Or just on a Healer ? *fg*

  15. This snippet needs the snippet or another solution to handle Cheap Shot

     

    What do we do ?

    1. We check, if the target is stuned.
    2. If not, we try a Kidney Shot,
    3. If Kidney Shot not ready AND we are in PvP OR in a Group AND attack the same Mob AND Vanish and Cheapshot are ready we vanish.
    4. ...(and now?)...
    5. Your (or my ()) Cheap Shot solution do its best to stun again.
    6. We remember Preparation...and use it.
    7. And we start at point  3. again
    8. After this Kidney Shot should be ready again. (20 sek cd)

    I use Kidney Shot with 4 or more Combo Points. If you want it faster, change the value after GetComboPoints (btw: do you know Nerve Strike ?)

        <FightClassSpell>
          <SpellName>--Stun</SpellName>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>LuaScript</ContionType>
              <Param xsi:type="FightClassConditionLua">
                <LuaScript>local spell="nothing"
    if UnitExists("target") and not UnitIsFriend("player", "target") and not (UnitLevel("target")==-1) then
        local stunId =    {
                            1833,         --[[ Cheap Shot ]]
                            408,          --[[ Kidney Shot ]]
                            47481,        --[[ Gnaw ]]
                            5211,         --[[ Bash ]]
                            22570,        --[[ Maim ]]
                            9005,         --[[ Pounce ]]
                            24394,        --[[ Intimidation ]]
                            91797,        --[[ Monstrous Blow ]]
                            50519,        --[[ Sonic Blast ]]
                            44572,        --[[ Deep Freeze ]]
                            118271,       --[[ Impact ]]
                            853,          --[[ Hammer of Justice ]]
                            89766,        --[[ Axe Toss ]]
                            54786,        --[[ Demon Leap ]]
                            30283,        --[[ Shadowfury ]]
                            7922,         --[[ Charge Stun ]]
                            46968,        --[[ Shockwave ]]
                            56,           --[[ Stun ]]
                            20549         --[[ War Stomp ]]
                        }
                            
        local function isStunned(unit)
            for i=1,#stunId do
                local spellname=GetSpellInfo(stunId[i])
                if UnitAura(unit,spellname) then return true end
            end
            return false
        end
        
        if not isStunned("target") then
    --[[ not stunned? maybe I can help... ]]    
            if not IsStealthed() then
                local idKidneyShot=408
                local start, duration, enabled = GetSpellCooldown(idKidneyShot)
                if (duration==0) then
    --[[ Combo Points &gt; 3 ? Gooood...night ]]
                    if (GetComboPoints("player", "target") &gt; 3) then
                        local spellname=GetSpellInfo(idKidneyShot)
                        if (IsSpellInRange(spellname, "target")==1) then
                            spell=spellname
                        end
                    end;
                else
                    --[[ Vanish only in PvP or if another group-member attack this target
                          test:  set "tryVanish=1" at training dummys ]]
                    local tryVanish=0
                    
                    if UnitIsPVP("player") and UnitIsPVP("target") then
                        tryVanish=1;
                    else
                        local group="party"
                        if IsInRaid() then 
                            group = "raid"
                        end
                        for i=1,GetNumGroupMembers() do
                            local member=group..i
                            if not (UnitIsUnit(member,"player")) then
                                if (UnitIsUnit(member.."target","target")) then
                                    tryVanish=1
                                    break
                                end
                            end
                        end
                    end
                    if (tryVanish==1) then
                        local idVanish=1856
                        local idPreparation=14185
                        local idCheapShot=1833
                        local start, duration, enabled = GetSpellCooldown(idVanish)
                        local CSstart, CSduration, CSenabled = GetSpellCooldown(idCheapShot)
                        --[[ Vanish AND CheapShot ready? And Target in CS-range ? ]]
                        if (duration==0) and (CSduration==0) then
                            local spellname=GetSpellInfo(idCheapShot)
                            if (IsSpellInRange(spellname, "target")==1) then
                                spell=GetSpellInfo(idVanish)
                            end
                        else
                            local start, duration, enabled = GetSpellCooldown(idPreparation)
                            if (duration==0) then
                                spell=GetSpellInfo(idPreparation)
                            end
                        end
                    end
                end
            end
        end
    end
    if not (spell=="nothing") then
        CastSpellByName(spell)
        print("stun: "..spell)
        result=true
    end;</LuaScript>
                <VarRet>result</VarRet>
                <ValueRet>true</ValueRet>
              </Param>
            </FightClassCondition>
          </FightClassConditions>
          <Priority>18</Priority>
          <CombatOnly>false</CombatOnly>
          <CheckIfKnowUsableDistance>false</CheckIfKnowUsableDistance>
          <CheckIfView>false</CheckIfView>
          <AddToSettings>true</AddToSettings>
          <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
          <DescriptionSpell>Stun it, whenever you can</DescriptionSpell>
        </FightClassSpell>
    
    
    

    based on WoW 5.4.2.

     

  16. Same usage of a LUA-Script as described

     

    "I want to break free" (Queen). In this case we want to break out of stealth. In PvP this will be most done with Cheap Shot , in PvE with Ambush . Ambush will only work, if you are behind the target. Because we couldn't not really be sure, that we are behind the target, I use a shadowstep before, (and a pickpocket. We have it, we should use it ;-) ).

     

    If Ambush is not usable (not more behind or spell not known), I try Cheap Shot, Garrote,  Revealing Strike and at last Sinister Strike to get out of Stealth into combat.

        <FightClassSpell>
          <SpellName>--Break Stealth</SpellName>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>LuaScript</ContionType>
              <Param xsi:type="FightClassConditionLua">
                <LuaScript>local attack=0
    if IsStealthed() and UnitExists("target") and not UnitIsFriend("player", "target") then
        if not (UnitIsPVP("target")) and (((UnitHealth("target") / UnitHealthMax("target") * 100) &gt; 97) or (UnitLevel("target")==-1)) then
    --[[ Ambush only if target is not in PVP and only as Opener OR target is a boss (they are not stuneable, so we prefere Ambush) ]]
            local idShadowStep=36554
            local idPickPocket=921
            local idAmbush=8676
            local start, duration, enabled = GetSpellCooldown(idShadowStep)
            local nameAmbush=GetSpellInfo(idAmbush)
            local timeleft=GetTime()-start
            if (duration==0) then
                local nameShadowStep=GetSpellInfo(idShadowStep)
                if (IsSpellInRange(nameShadowStep, "target")==1) then
                    CastSpellByName(nameShadowStep)
                end
            elseif (timeleft &lt; 2) then
                local spellname=GetSpellInfo(idPickPocket)
                CastSpellByName(spellname)
                CastSpellByName(nameAmbush)
                attack=nameAmbush
            end
        end
        if (attack==0) then
    --[[ 1. try Ambush (failed if you are not behind the target
                        or you dont now the spell)
    
         2. try Cheap Shot (failed if unknown)
         3. try Garrote (failed if unknown)
         4. try Revealing Strike (we want to break steal, right ?)
         5. try ( Fifth try? You are not level 20 ????)
                okay, a simple sinister will do the work
    --]]
            local idSpells={1833,703,84617,1752}
            for i=1,#idSpells do
                local start, duration, enabled = GetSpellCooldown(idSpells[i])
                if (duration==0) then
                    local spellname=GetSpellInfo(idSpells[i])
                    if IsStealthed() and (IsSpellInRange(spellname, "target")==1) then
                        CastSpellByName(spellname)
                        attack=spellname
                    end
                end
            end
        --[[ no more try. get near to the target !!! You'are a melee !!! ]]
        end
    end
    if (attack~=0) then
        print(attack)
        result=true
    end
    </LuaScript>
                <VarRet>result</VarRet>
                <ValueRet>true</ValueRet>
              </Param>
            </FightClassCondition>
          </FightClassConditions>
          <Priority>19</Priority>
          <CombatOnly>false</CombatOnly>
          <CheckIfKnowUsableDistance>false</CheckIfKnowUsableDistance>
          <CheckIfView>false</CheckIfView>
          <AddToSettings>true</AddToSettings>
          <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
          <DescriptionSpell>Break stealth with ambush, Cheap shot or Garrote</DescriptionSpell>
        </FightClassSpell>
    
    

    based on WoW 5.4.2.

     

×
×
  • Create New...